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" } }
Copyright © 2024 NodeBB | Contributors