我正在尝试在xxx.xxx.xxx.xxx/nodebb
. 我对 Nginx 和 NodeBB 有以下设置:
/etc/nginx/conf.d/nodebb.conf
server {
listen 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 Support
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"
}
当我导航到时,我会通过浏览器错误消息xxx.xxx.xxx.xxx/nodebb
重定向到。任何想法我做错了什么?xxx.xxx.xxx.xxx/nodebb/404
This web page has a redirect loop
编辑:只是说如果我导航到http://xxx.xxx.xxx.xxx:4567/nodebb/
- 它工作正常