Settings up NodeBB on a subdomain



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


  • Global Moderator

    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.


Log in to reply
 

Suggested Topics

  • 6
  • 7
  • 4
  • 3
  • 1
| |