1 VPS with nginx and apache2 serving 2 different sites (wordpress and ghost blog)

I need help with this one. I have a vps (ubuntu 16.04) that already has a working wordpress installation (prod and a staging) using apache2. Now I also want to deploy a ghost blog which uses nginx. I’ve followed this reverse proxy guide so that the 2 web servers don’t use the same port 80. Then I followed this ghost install guide which works great, but I can’t get to the final step which is running the website. I’m getting a 502 bad gateway on the new domain that’s supposed to be running the ghost blog, but the wordpress sites still works fine. What am I doing wrong?

I’ve since deleted nginx and the ghost installation since so that my other site is not affected.

Out of frustration, I transferred the webserver from nginx to apache2. I still can’t run ‘ghost start’ but I can visit the domain, but it’s displaying an index:
image

How can I fix this?