Question
Two different Node apps, with two different domains, in one droplet.
Ok, for instance, I have two apps running on two different ports, using forever. Using a third app, how could you make example1.com go to 127.0.0.1:3000 and example2.com go to 127.0.0.1:3001?
I’ve seen answers talking about vhosts, but exclusively using nginx, and what should I do, especially regarding DNS?
PS: most answers tend to be using subdomains, which isn’t the case. It’s two completely unrelated domains. Also, both apps have very low visitations, so having multiple apps hosted on the same droplet shouldn’t be a problem.
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.
×