I do have a complex scenerio. I have two AWS instances.
Instance 1: Running Nginx (have 1 private IP, 1 public IP)
Instance 2: Running Nodejs server (have 1 Private IP only, NO PUBLIC IP)
Here is what I am trying to do. I have a redirect setting in my nginx config which forwards the requrest for a particular URL to Instance 2.
It works fine when I try browsing from http://Instance 1's private IP, but it does not work if I try by browsing from http://Instance 1's public IP.
I am using nginx reverse proxy setting. It works great when URL is browsed via private IPs but does not when it is browsed via public IP.
What I might be doing wrong? or this something that is not supported?
Regards Aun