Nodejs and Apache in the same doplet

First of all: Congratulations boys, you have an incredible service.

Hi, i have got severals wordpress blogs in my droplet, each with it own domain, f.e:

Now the problem is that i want to start a big project, with node.js and express, and i prefer to have a big droplet than many of 5$. I bought the domain and i want to point with it my node.js app running in port 80.

How can i do that? if you need more details please ask.

Thanks for the help, ToracosLabs.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi! I’m glad you like DigitalOcean. :)

Yes this is possible. Usual set up is to run Node app on non 80 ports (for example 8080, 3000, you can use any greeter than 1024) and make reverse proxy with Nginx or Apache to port 80. This is done because to run something on port less than 1024 you need to run it with with root privileges. That’s why you usually want to run it on any port greeter than 1024 then use reverse proxy to make it work on 80.

DigitalOcean covered you for Node.js + Nginx in How To Set Up a Node.js Application for Production on Ubuntu 16.04. About Apache, I think there is no direct tutorial for Node.js but How to Set Up Apache Traffic Server as a Reverse-Proxy on Ubuntu 14.04. It is for Ubuntu 14.04 but is also relevant for 16.04. I really recommend to read Nginx one also, it’s great one. Pay attention to pm2 part, it’s Nodejs service management plug in that will help a lot.

If you got any question, feel free to ask, I’ll or somebody other will try to give you answer. :)