Interestingly I asked ChatGPT to check the nginx config and it gave me a new one that seems to have solved both problems. No idea what was wrong, but thank you very much for your help!
SimonA
Posts
-
Login first time -
Login first timeMmm ... after loading cert I can't get nginx to load
```
systemctl status nginx.service
Ă— nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-11-12 23:08:22 UTC; 22s ago
Docs: man:nginx(8)
Process: 1270 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FA>
CPU: 3msNov 12 23:08:22 ip-172-31-24-78 systemd[1]: Starting nginx.service - A high performance web server and a revers>
Nov 12 23:08:22 ip-172-31-24-78 nginx[1270]: 2024/11/12 23:08:22 [emerg] 1270#1270: invalid parameter "spdy" in>
Nov 12 23:08:22 ip-172-31-24-78 nginx[1270]: nginx: configuration file /etc/nginx/nginx.conf test failed
Nov 12 23:08:22 ip-172-31-24-78 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Nov 12 23:08:22 ip-172-31-24-78 systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 12 23:08:22 ip-172-31-24-78 systemd[1]: Failed to start nginx.service - A high performance web server and a>
lines 1-13/13 (END)
Ă— nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-11-12 23:08:22 UTC; 22s ago
Docs: man:nginx(8)
Process: 1270 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 3msNov 12 23:08:22 ip-172-31-24-78 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
Nov 12 23:08:22 ip-172-31-24-78 nginx[1270]: 2024/11/12 23:08:22 [emerg] 1270#1270: invalid parameter "spdy" in /etc/nginx/sites-enable>
Nov 12 23:08:22 ip-172-31-24-78 nginx[1270]: nginx: configuration file /etc/nginx/nginx.conf test failed
Nov 12 23:08:22 ip-172-31-24-78 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
Nov 12 23:08:22 ip-172-31-24-78 systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 12 23:08:22 ip-172-31-24-78 systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.This is my config - any obvious issues?
redirects http requests to https
server {
listen 80;
server_name cosmonous.com;return 302 https://$server_name$request_uri;
}
the https server
server {
# listen on ssl, deliver with speedy if possible
listen 443 ssl spdy;server_name cosmonous.com; # change these paths! ssl_certificate /etc/letsencrypt/live/cosmonous.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/cosmonous.com/privkey.pem; # enables all versions of TLS, but not SSLv2 or 3 which are weak and now deprecated. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # disables all weak ciphers ssl_ciphers 'AES128+EECDH:AES128+EDH'; ssl_prefer_server_ciphers on; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567; # no trailing slash proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
}
-
Login first time@baris said in Login first time:
You should set the value of url in config.json to the url you are accessing the forum, you might also want to setup SSL for that url.
Thanks Baris. Okay I assumed that was some kind of local loopback in the config.json because of the proxy, but have now updated it and restarted the instance. No change however - in fact you can’t even register as a new users on the laptop, or login as a new user I created on the phone. Strange.
This is just a test / demo instance so I was trying to avoid paying for a cert, but I will use a free local one for now. Could that be causing the problem?
-
Login first timeEven stranger - it logged on fine on my phone with that account. I saved my login credentials on the phone, and still get the same error on both my browsers on the laptop!
On the laptop it's redirecting to http://cosmonous.com/undefined
-
Login first timeHi All
I followed the installation instructions on Ubuntu and have the web site up and running. The instructions were pretty good, although a few small things would have helped a linux newbie like me.
I also had a weird error of "Bad Gateway" that seems to have gone away with a restart. However I am stuck now in that I cannot login with the app admin account I created during setup. A message comes up bottom right saying "Welcome back guest", then it goes to a page:
Not Found
You seem to have stumbled upon a page that does not existI'm sure that I'm using the correct account as per the instructions, and I also tried using the email address instead of name. I even tried using the OS account I used to install / run NodeBB.
Any idea what the problem is?? The forums have helped with various things, but I can't find anything on this...
-
Managed DatabaseThank you very much - much appreciated. I look forward to giving it a go!
-
Managed DatabaseThat's really useful thankyou PL. And yes sorry, MongoDB
In terms of the VPS you have suggested, you have not selected the backup. Is that not high risk with the database on the instance? Or does the database need to be dumped to a flat file separately anyway? This was one of the reasons I was thinking of a managed DB, as usually you can just revert the DB back when necessary...
Also how far will NodeBB scale on a single M VPS server including the DB? The expectation is that is could end up with tens of thousands of users, so potentially a high number of concurrent users? I guess it's always possible to migrate it to a bigger setup later, but do you have any idea what kind of load an M class VPS could handle?
Interestingly I tried using the docker image with AWS ECS Fargate in my test account while I was waiting for a reply here, and the service created an error which I spent the last hour trying to solve. So I'm happy to give up on that approach!
-
Managed DatabaseHi all
I’ve agreed to help someone setup a forum, and partly because a threaded view will be useful for more in depth discussions, I think NodeBB is the best of the shortlist. However as the previous forums/websites I’ve created have been hosted on managed web space, and my experience of linux / node.js etc are very basic, I’d like to keep the setup as simple as possible.
For various reasons, it’s necessary to host it on Ionos. I’d like advice on a couple of decisions before I go any further:
- VPS or “Cloud Server”. In terms of ease of management and scalability, I’m assuming that a Cloud Server would be the better option?
- Ionos offer a managed MungoDB service. Any reason not to use an Ionos managed MugoDB?
- Maintenance. It sounds like there are going to be several layers of software installed - linux, node.js, nginx, nodeBB (+ MungoDB) etc. Do all of these need to be updated separately and manually?
- I'm tempted to use the Docker image, but I assume that is likely to be more challenging than a standard install?
Any comments on any of these would be appreciated…