Deploy NodeBB in a subfolder of a site



  • 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:

    1. How to config to make NodeBB works together with the site, since NodeBB start will listen to a port and the host site need that port too.
    2. Is it possible the start NodeBB only (http://.domain.com:4567/forum) and provides access to some items such as static pages ( ex: http://.domain.com:4567/test.html)

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



  • Thanks, I will try with nginx (new for me same as NodeBB).

    Could you please tell me if there has some limitation such as where to deploy the NodeBB.

    Thanks again.



  • @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.


  • Admin

    Deploying in subfolder or (sub)domain should be identical -- if differences are identified, report them as bugs, please 😄


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.