After installing, there is no CSS, and all links are broken



  • Hi! Any help would be greatly appreciated 😁!

    Versions

    • nodebb - 1.13.4-0
    • mongoDB - 4.0.18
    • nodejs - 12.16.3
    • ubuntu - 16.04 LTS
    • nginx - 1.14.0

    1. I followed instructions as laid out in the docs.

    2. Upon installing, this is what I see on the page when I launch the forum.
      ac062c9a-7569-460b-9cc7-ca0d1eccdabd-image.png

      9829da1f-eac8-41f7-8199-efaa66a2eaf0-image.png

    3. At the bottom, there is a message saying the connection to NodeBB is lost. Here is the server log

      a9390c3f-6a9e-453c-a6e9-bc69ecb88944-image.png

    4. All links are broken. I get a 404. Here is the server block (its the default one in the docs)
      84bbef12-1166-45a6-8003-d0aa9d1f2666-image.png

    Thanks!


  • Community Rep

    @jag Let's rule out some low hanging fruit:

    1. What happens if you bypass nginx and connect directly to port 4567?

      If this is running on a remote vm you (hopefully) need to tweak your firewall rules to allow connection to that port, which you should further limit to only the ip address you will be connecting from.

    2. Check permissions and ownership on your nodebb directory. Did you create a dedicated nodebb user? Perchance did you install nodebb as root? Subsequently then try to launch as mortal user?

    3. Presuming all of above is fine, login/su to your nodebb user and try rebuilding and (re)starting nodebb

       ./nodebb build && ./nodebb -l (re)start
      
    4. The gurus here will likely inquire as to your nodebb's config.json so if none of above helps you may want to "sanitize" any private/sensitive bits and post that up. In particular, ensure the url in config.json matches your nginx server_name parameter.



  • Hi @gotwf - thanks so much for the quick response. Though none of the above directly helped, I was able to get it working.

    I think the issue lay in 1 of 2 things I was doing - a) I had the ubuntu firewall ufw running, and/or b) I was installing everything as root.

    I re-did the install as a non-root user which is a no-brainer. But as for the firewall, this is an instance on Google cloud so there is that added protection. But I would also like to have that second layer of protection in the instance as well. In order to set that up, what additional config would I need to allow/deny? Thoughts?


  • Community Rep

    @jag I have not used Ubuntu in some while and unfamiliar w/current defaults as I favor OpenBSD and pf for firewall/routing duties. Also do my own cloud stuff and no clues about Google Cloud so others will be better than I in those departments.

    A couple suggestions:

    1. Since you are using nginx, tune your config.json to limit nodebb to localhost. NodeBB Config Docs are your friend. Here is the snippet you want:
    "bind_address": "127.0.0.1"
    
    1. Although NodeBB does have some builtin protections, you may also want to explore implementing something like Fail2Ban to help keep the miscreants at bay.

    Glad to hear you are up and running. Now the real adventure begins. Have fun. ✌



  • Ok thank you @gotwf

    Also looks like I spoke too soon - regarding your original question 1, if I bypass nginx and connect directly using the server external ip to port 4567, I can see nodebb launch "correctly". But if I access it through the domain name, it gives me the above result. So that did matter.

    Here is the nginx server block (file name - forum.kado.ai.conf)-
    ef212ef4-08fe-4d4c-91d0-3a33796fd31c-image.png

    Here is the nodebb config file.
    07aefd27-b7e6-455c-a0e3-25551b48b7f8-image.png

    Thanks again!


Log in to reply
 

Suggested Topics

| |