I’m trying to connect one droplet with a wordpress app to another with a nodejs app, lets say a chat.

https://example.com would be the wordpress app. I want that when someone enter to https://example.com/chat, he or she enters to the nodejs app. how could i connect both apps behind a load balancer and a database?

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.

Submit an Answer
1 answer

This should help:


Make sure all three droplets have private networking enabled so Nginx proxying happens on those internal networks. In your Nginx vhost definition you’ll have two “location” blocks, one for the root example.com/ and one for the chat app example.com/chat.