I have the following configuration:
server {
listen: 8080;
location / {
proxy_pass https://somehost.abc.xyz;
proxy_redirect off;
proxy_set_header Host somehost.abc.xyz;
proxy_set_header X-Real-IP somehost.abc.xyz;
proxy_set_header X-Forwarded-For somehost.abc.xyz;
proxy_set_header X-Forwarded-Host somehost.abc.xyz;
proxy_set_header HELLO pizza;
}
}
Whenever I hit the proxy, let's say I go to http://localhost:8080/home, I get 503 service unavailable (not from the nginx service, from the app I'm trying to go to https://somehost.abc.xyz/home).
But if I just go to https://somehost.abc.xyz/home or do a redirect return 301 https://somehost.abc.xyz/home;
it's all good and I get to the app. Although this doesn't help me, because I want to get there through the proxy so I can add a request header to every request that goes through.
Any ideas what could possibly cause this and how to solve it?