How to get Nodejs to run on port 80

software development

#1

I got a VPS on Dreamhost and have create a Nodejs application however, since I do not have sudo access on the VPS I can’t use port 80 and therefore had to create a proxy in my .htaccess file that redirected the user to port 3000.

Now in the URL there is an ugly port 3000.

How can I get nodejs to run on port 80?


#2

You should be able to setup a proxy pass using DreamHost’s panel. On https://panel.dreamhost.com/index.cgi?tree=domain.proxy& ignore the ‘mongrel’ part and focus on the proxy: you should pick the domain name you have your node app running, and put the port 3000 in the form below.

I noticed that the help page has a warning for ‘unsupported information’: https://help.dreamhost.com/hc/en-us/articles/217955787-Proxy-Server
If those instructions work for you, could you please let me know? In exchange on improved documentation, DreamHost will refund your bill for next month (up to $100). See the details on https://www.dreamhost.com/blog/2016/08/10/get-dreamhost-cloud-credit-in-exchange-for-your-knowledge/ (even if the post is mostly about cloud, I can extend that to your case.)