I have a VPS with Instance (Debian 9.4 (stretch) 20180404)
There I have a few WordPress sites and also a nodejs app that I will call "prod" running with PM2 without any problem whit apache2.
Now I want to run a new nodejs app on a subdomain which basically will be the dev environment of the previous and working node.
My issue is that when I start dev, prod gets connected to dev's database, no matter if I run dev as "node inde.js" or by PM2.
Each node environment is in its correct web folder and has a specific .env that has the credentials to access each database (one for prod and another for dev)
Could anybody please help me to sort out this issue?
On the apache2 config, I configure a proxypass reverse so I don't have to add the:3000 and I copied the conf to dev, could be that a problem? Are both listening to the same port? if yes, how do you suggest solving it?
Thanks in advance!