how to use $host variable in proxy_pass

Piotr Sikora piotr.sikora at
Wed Dec 28 18:45:57 UTC 2011


> I want to use $host variable in proxy_pass. If directly hardcode
> Hostname in proxy_pass it is working fine. But if I use variable $host
> it is giving me "502 Bad Gateway"

Check your error.log, it will tell you that you're missing "resolver".

Best regards,
Piotr Sikora < piotr.sikora at >

More information about the nginx mailing list