So I have what seems to be a seemingly simple problem, but I am very new to this. I have set up a reverse proxy for my development environment, and I have have several machines that run different applications so I have them running on localhost with different ports obviously. Whenever I hit a location say localhost/location1 and localhost/location2 it does a proxy_pass to localhost:8000 and localhost:4343. However, when I hit the root location seen below in my browser the url changes to the actual URL of the proxy_pass https://develop.example.com/; instead of just saying localhost which I would expect it to do like all the others do. So why does this change the URL? I have even tried doing a proxy pass to google which works as expected it just says localhost but shows a google 404 page. Any insights and or suggestions on how I can go about debugging this would be appreciated.
location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-URI $request_uri; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Published-On https://develop.example.com/; proxy_pass https://develop.example.com/; #proxy_pass http://www.google.com/; index index.php; }
serversection instead of a singlelocation?