How do two sites (NodeBB and another) share a single domain name (/ vs /forum)



  • The DNS, thesite.com, is already used by Wordpress. Wordpress has database and in that database, the pages are registered with their respective routes. This means that you need to register a page for the route /forum under Wordpress.

    How to make the url of NodeBB Forum to thesite.com/forum?

    I know this process is possible since there are sites who has the DNS in Wordpress site and the NodeBB forum in a route, like the following:
    https://thepublicbox.com/forum is part of https://thepublicbox.com
    https://www.bitcoin-hrvatska.com/forum is part of https://www.bitcoin-hrvatska.com
    https://www.seaofthieves.com/forum is part of https://www.seaofthieves.com
    https://bethesda.net/community is part of https://bethesda.net
    https://notepad-plus-plus.org/community/ is part of https://notepad-plus-plus.org

    I just don't know where to configure this. Or what is it that I'm missing?

    Appreciate your help.


  • GNU/Linux Admin

    Correct, if all traffic goes to the WordPress site, then WordPress essentially owns the site, except if you have a reverse proxy intercepting traffic as it comes in, and deciding where it needs to go.

    One such reverse proxy is nginx... Or apache... Or lighttpd

    Think of it as such:

    • The request for thesite.com comes in
    • Nginx resolved this as a request that should go to WordPress, and thus kicks off the requisite php-fpm (or whatnot) processes to handle the request.

    Vs

    • A request for thesite.com/forum comes in
    • There is a rule saying anything that starts with /forum is actually NodeBB
    • Nginx proxies the request to NodeBB to handle

    What is important to note is that how you configure nginx affects the routes on instances behind it. For example, if you configure nginx to serve NodeBB when /forum is accessed, then any /forum routes served by WordPress are inaccessible.

    Hope that helps explain it a bit!


  • GNU/Linux Admin

    Correct, if all traffic goes to the WordPress site, then WordPress essentially owns the site, except if you have a reverse proxy intercepting traffic as it comes in, and deciding where it needs to go.

    One such reverse proxy is nginx... Or apache... Or lighttpd

    Think of it as such:

    • The request for thesite.com comes in
    • Nginx resolved this as a request that should go to WordPress, and thus kicks off the requisite php-fpm (or whatnot) processes to handle the request.

    Vs

    • A request for thesite.com/forum comes in
    • There is a rule saying anything that starts with /forum is actually NodeBB
    • Nginx proxies the request to NodeBB to handle

    What is important to note is that how you configure nginx affects the routes on instances behind it. For example, if you configure nginx to serve NodeBB when /forum is accessed, then any /forum routes served by WordPress are inaccessible.

    Hope that helps explain it a bit!



  • @julian Thanks so much ! This totally make sense. Worth to note, to add proxy_pass blocks to static files too. 🙂


Log in to reply
 

Suggested Topics

  • 1
  • 7
  • 44
  • 1
  • 3
| |