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"
}
}