Thanks for your reply!
I figured as I am aware of the diferences, but worth to ask as from my perspective meteor is easier to develop with.
I am new to NodeBB, and my opinion is that it is an amazing piece of software and the developers did an amazing job.
It has it all as a skeleton for bigger and better apps (from my perspective) and it is sad that is made just as a forum.
I am learning now how to extend the nodebb functionality.
Nginx for SSL in NodeBB
-
I used Lets Encrypt for SSL in NodeBB, and i config nginx below:
server { listen 80; server_name d.paopevil.com; return 301 https://$host$request_uri; } server { listen 443 ssl; server_name d.paopevil.com; ssl_certificate /etc/letsencrypt/live/d.paopevil.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/d.paopevil.com/privkey.pem; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567/; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location ~ /.well-known { allow all; } }
But I don't login with Admin account. And where did I go wrong?
-
Nginx config :
# code block # HTTP Server server { source_charset utf-8; listen 80; server_name nodebb.dev; rewrite ^ https://$server_name$request_uri permanent; } server { source_charset utf-8; listen nodebb.dev:443; server_name nodebb.dev; ssl on; ssl_certificate ../../openssl/certs/nodebb/server.crt; ssl_certificate_key ../../openssl/certs/nodebb/server.key; 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; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
and the NodeBB config :
{ "url": "https://nodebb.dev:4567", "secret": "9feb33e9-6665-40ab-9209-d74825c4f668", "database": "mongo", "port": "4567", "mongo": { "host": "127.0.0.1", "port": "27017", "username": "nodebb", "password": "password", "database": "nodebb" } }
-
You don't need the port number in
url
inconfig.json
if you're using nginx as reverse proxy.In your nginx server block, just have
listen 443 ssl
- no need to specify a bind address.Use
nginx -t
to test configuration. -
This post is deleted! -
Thank you!
I use SSL so I have to add the following line of code to Nginx:
proxy_set_header X-Forwarded-Proto $scheme;
Then restart nginx and Nodebb, and this working.
-
Did you pack the SSL certificate based on the nginx documentation ? I use "Let's Encrypt" and it only worked when I did NOT pack the certificate crt file.
-
Pack? You mean combine with intermediate certs? To my knowledge no such combining is required when using Let's Encrypt
-
Yes, figured that out the hard way lol