Hello everyone,
As I was following the tutorial for setting up a production-grade nodejs app on ubuntu 18.04, I came across some difficulties. Here is the link for the tutorial: [https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-18-04](http://). Everything works great except that I have two nodejs apps running on two separate droplets within the same VPC. Both droplets are set the way following the tutorial link I mentioned above. I have two different domains. Each domain is pointed to each one of the droplets. The apps work individually as they should, meaning they can be reached out from their domain. The two droplets are supposed to talk to each other. Right now they can talk using the each other’s domain. But I want them to talk to each other using their private ip addresses since they are on the same VPC. When I run curl http://PRIVATE_IP_2 from droplet1, the response comes from the app running on the droplet. But as soon as I add a path to it, nginx responds with its 404 default page content. Like curl http://PRIVATEIP2/api/internal would give me that nginx 404 page content and curl http://PRIVATEIP_2 will return the app’s response. I really need your help make my work with external domain while they still communicate other the private network. Thank you

Submit an answer

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