Forum is only accessible via port 4267 how do i switch to port 80 ?
-
Hi Team,
I have setup the forum on CentOS 7 and Redis.
I followed the docs and now the forum is only accessible via port 4267
like this http://www.myxyzforum.com:4267
How do I make it available on www.myxyzforum.com ?
What changes are required ? Your help is much appreciated.
regards,
Maahi.. -
If you want the quick and dirty you can change it to port 80 in your config.json if you do and your hosting on linux your likely going to need to run it via sudo.
-
@codejet said in Forum is only accessible via port 4267 how do i switch to port 80 ?:
pretty damn easy man, just make it http://www.server.com:80
@codejet first of all I didn't believe you when you said that... !! may be because i have tried it and it failed... so I went along with all other attempts to configure proxy and i failed miserably with proxies.... I thought that nodebb cant listen on port:80. I see it is recommended to use a proxy and not to expose port 80 directly....
Thanks a lot everyone for your prompt response.... finally we nailed it... ( I am a total linux noob with 10 years windows server experience , so you can understand how pathetic I am at this simple thing... )
I am now planning to configure a proxy with Nginx and will comeback for help if needed...
Just to confirm, do i need to change in ./nodebb setup the website to http://127.0.0.1:4567 (currently it is http://www.myxyzforum.com:80 )
if i am going to use the below proxy file in Nginx
server {
listen 80;
server_name domain.com;
location / {
root /var/www/nodebb;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:4567/;
proxy_redirect off;
# Socket.IO Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}Kind regards,
Maahi -
On Linux, you cannot listen on ports under 1024. This is for your protection. You can override it with sudo, which makes NodeBB run with root privileges, but that is even more dangerous, as it violates the principle of least privilege.
Use nginx to proxy connections on port 80 to your NodeBB (running on port 4567).
Your config will just have the
url
set to your site, and you won't have to specify a port in the config. -
@Maahi said in Forum is only accessible via port 4267 how do i switch to port 80 ?:
Just to confirm, do i need to change in ./nodebb setup the website to http://127.0.0.1:4567 (currently it is http://www.myxyzforum.com:80 )
Use
http://www.myxyzforum.com
.