Settings up NodeBB on a subdomain

Technical Support
  • I have installed Ghost blog on the root of a server like myghost.com
    Now I want to install NodeBB on a subdomain like forum.myghost.com
    I managed to set the DNS to use the subdomain, although it serves the content from myghost.com
    How could I install NodeBB on the same server and be accessed from a subdomain?

  • You set up your DNS so myghost.com and forum.myghost.com both point to your server's IP. Then, on your server, you configure the reverse proxy (usually nginx) to serve both by creating two server configurations.

    In nginx on ubuntu, this looks like the following fire structure:

    • /etc/nginx/
      • sites-available/
        • myghost.com (text file)
        • forum.myghost.com (test file)
      • sites-enabled/
        • myghost.com -> ../sites-available/myghost.com (symlink)
        • forum.myghost.com -> ../sites-available/forum.myghost.com (symlink)

    Then in the myghost.com text file you have something like:

    server {
      server_name myghost.com;
      ...
    }
    

    And in the forum.myghost.com file, you have a config following the NodeBB nginx config:

    server {
      server_name forum.myghost.com;
      ...
    }
    
  • @PitaJ thanks. I need to install it on Heroku and it doesn't have nginx now. I know I have a long road ahead, but I think I found the direction.


Suggested Topics


  • 0 Votes
    2 Posts
    468 Views

    I just tested installation of NodeBB on fresh OS and its working. There have to be something wrong with my OS.

  • 0 Votes
    2 Posts
    337 Views

    Try the Ubuntu docs instead of the Debian docs. They're more up to date.

  • Nodebb Error

    Technical Support
    0 Votes
    9 Posts
    921 Views

    @Nicolas-0 said in Nodebb Error:

    HI, I have error to install nodebb in debian:

    16/1 22:29:48 [20173] - error: [build] client side styles build failed
    16/1 22:29:48 [20173] - error: [build] Encountered error during build step: Inline JavaScript is not enabled. Is it set in your options?
    16/1 22:29:48 [20173] - error: message=Inline JavaScript is not enabled. Is it set in your options?, stack=undefined, type=Syntax, filename=/root/forum/nodebb/node_modules/nodebb-theme-persona/less/bootstrap/buttons.less, index=1134, line=51, column=4, callLine=NaN, callExtract=undefined, extract=[ pointer-events: none; // Future-proof disabling of clicks, .opacity(.65);, .box-shadow(none);]

    This is because less 3.x apparently does not support inline javascript.

    You probably ran "npm audit" which threw out four less vulnerabilities and prompted you to update less to fix them, which broke the client side styles build step of NodeBB.

    Fix it by downgrading less to the supported version by running "npm install [email protected]".

    That should cause the next ./nodebb build to process correctly.

  • Run NodeBB with PM2

    Technical Support
    0 Votes
    2 Posts
    1k Views

    @HARIOM-VASHISTH Hey!

    There seems to be a problem with PM2 where I always get a notification about disconnecting and re-connecting. Had an issue with that?

  • 0 Votes
    9 Posts
    2k Views

    @julian alt text

    I wasnt expecting Chrome to autofill in the settings page 😞

    IL see my self out.

    Thanks