I am trying to redirect from an external-facing nginx server to a separate internal server also running nginx. The internal machine will be used for a specific purpose, so I need all requests to http://mydomain/internal to be proxied to this machine. I've set up proxy_pass to handle this, but the response doesn't return to the client (unless I'm testing inside the LAN). I assume this is because the internal machine has a non-routable internet IP, so I need to have it pass back through the external machine--how do I do this?
I'd like to avoid giving this machine a public IP. I've been Googling and trying various nginx.conf options (which is why I hesitate to post them right away), but have not had luck yet.