@psychobunny may have fixed this on latest master
Nodebb only accessible via IP address not domain
Hey guys, so I finally got a fresh install of the Nodebb on my digitalocean server. Everything went alright however I was only able to use it if I use the IP address with the port of 4567. So here it's http://18.104.22.168:4567. I tried using the actual web address (something.com) but it shows an error reloading page.
Could you guys please help me?
Aizan Fahri last edited by aixnr
Short answer: I would use reverse-proxy as the solution.
The thing is,
something.comis actually pointing to
something.com:80, so if you want it to work without resorting to reverse-proxy solution, try to tinker a bit with the configuration file of the NodeBB so that your NodeBB uses port
4567. Else, install Nginx (or Apache2), and use it as reverse-proxy.
Hope this article can help you.
Edit: Here's the official documentation telling you how to do it, that reverse-proxy thingy.
@aixnr So you're saying that during the installation I should change the port number to 80 instead of 4567 right?
cd ~ sudo apt-get install nginx cd /etc/nginx/sites-available sudo nano *something.com*
Paste in the server block that's in the docs, replace the relevant information, normally just server name.
ln -s /etc/nginx/sites-available/*something.com* /etc/nginx/sites-enabled
This will symlink it from sites-available, to enabled. Then run
sudo service nginx restart
*something.com*with the URL you're going to use
forumthatisgreat.comas an example. Also go to config.json in your nodebb folder and change use port to : false
@a_5mith Could you please help me? I do not get it
This has been resolved, nginx wouldn't reload after a symlink was created. Running the command with logging switched on led to
could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
going into nginx.conf and uncommenting
means it now works.