NodeBB with Nginx - "This web page has a redirect loop" -
i'm trying set nodebb @ xxx.xxx.xxx.xxx/nodebb
. have next settings nginx , nodebb:
/etc/nginx/conf.d/nodebb.conf
server { hear 80; server_name localhost; location /nodebb/ { 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 back upwards proxy_http_version 1.1; proxy_set_header upgrade $http_upgrade; proxy_set_header connection "upgrade"; } }
/usr/share/nginx/nodebb/config.json
{ "base_url": "http://`xxx.xxx.xxx.xxx", "port": "4567", "secret": "xxxxxx-xxxxxxxxxxx-xxxxxx-xxxxx", "bind_address": "0.0.0.0", "database": "mongo", "mongo": { "host": "127.0.0.1", "port": "27017", "username": "xxxxxxxx", "password": "xxxxxxxxxxx", "database": "xxxxxxx" }, "bcrypt_rounds": 12, "upload_path": "/public/uploads", "use_port": false, "relative_path": "/nodebb" }
when navigate xxx.xxx.xxx.xxx/nodebb
redirected xxx.xxx.xxx.xxx/nodebb/404
browser error message this web page has redirect loop
. ideas i'm doing wrong?
edit: if navigate http://xxx.xxx.xxx.xxx:4567/nodebb/
- works fine
set server name same base_url, not localhost.
nginx nodebb
No comments:
Post a Comment