Question
How can I get Node.js to listen on port 80?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×I did this, didn’t work… How do I restore the defaults?
edit: apparently sudo iptables -F
resets iptables to default. still not working though, maybe i screwed something else up along the way.
edit 2: now it’s working again, just a slight delay.
$ setcap 'cap_net_bind_service=+ep' /path/to/.nvm/v0.10.17/bin/node
$ apt-get remove nginx
$ cd /path/to/app
$ PORT=80 node app
That is a pretty decent tutorial. I actually bought it before seeing this post… still haven’t finished it but its good so far :)