@schajuli I feel like this should work, but I'll have to try it and see if I can reproduce the issue you're seeing.
The pidfile errors are probably because the files you copied over don't have the right permissions.
Can anyone give a full document about how to deploy NodeBB in a subfolder of a site?
I googled and tried without success as expected . (The NodeBB can start and access as http://***.domain.com:4567/forum (expected))
Some of my questions:
I'm trying to use NodeBB in Cloud 9, any suggestion / direction about deploy NodeBB is welcome.
Thanks in advance.
Nodebb config should look like this:
{
"url": "http://domain.com/forum",
"secret": "somehash",
"database": "redis",
"redis": {
"host": "127.0.0.1",
"port": "6379",
"password": "somepass",
"database": "0"
}
}
Your nginx config (in case you use nginx) should look something like this:
server {
listen 80;
server_name domain.com;
#charset koi8-r;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error_log;
location / {
some code for /;
}
location ^~ /forum {
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 ^~ /forum {"
@Henry-Jia said:
Could you please tell me if there has some limitation such as where to deploy the NodeBB.
It does not have any known limitation.
@ A Former User
I just wanted to note that the regex isn't necessary. I just installed and my working config is as follows:
location /forum/ {
proxy_pass http://172.17.2.3:4567;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
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 X-NginX-Proxy true;
# Socket.IO Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
}