Port 80
-
I'm a little confused.
NodeBB seems to run fine on any other port, so what exactly is the issue with it running on port 80? If I set the port to 80 in config.json, we get no response at all.
I understand running node as root is not recommended but it's not a big issue... this bit of code will downgrade the user to the owner of that file once port 80 is listened on:
require("fs").stat(__filename, function (err, stats) { process.setgid(stats.gid); process.setuid(stats.uid); console.log("Downgraded to non-root user, uid:", stats.uid); });
So besides from that, are there any other reasons we can't serve on port 80? I don't much want to be messing about with proxies and so on.
-
@jk4321 said:
If I set the port to 80 in config.json, we get no response at all.
It might be the case that another process is already listening on port 80. Many popular Linux distributions come with
httpd
(AKA: Apache) installed and enabled by default, so you could check if that or any other webservers (i.e. Nginx, Litespeed) are running.If it's none of those processes, try doing a quick google search for "(name of your OS) port usage".