Nginx proxying to remote path

Started by Szeraax, December 30, 2021, 08:53:27 PM

Previous topic - Next topic
Aggggh, I'm going crazy. I'm sure that its something simple, but I can't find it. I'm trying to have an nginx server that forwards requests to a remote path. Example:

Someone accesses https://myhost.mydomain.com and the nginx serves data from https://site.somedomain.com/path

The URL shows only https://myhost.mydomain.com to the user. The issue I'm having is that normally, I just use an upstream server for my requests, which is a domain name or an IP address. No prefix and no path appended. So I can't figure out how to have nginx go get the remote location at the path.

Anyone able to point me to a previous post on this? I'm sure that I'm not the first one to ask, but I don't see anything covering this scenario in my searches or in the documentation: https://docs.opnsense.org/manual/reverse_proxy.html