proxy_set_header host

Fr Tr lists at
Wed Dec 2 21:16:38 MSK 2009

I am having quite some trouble with something that should be pretty

I have an app deployed at http://localhost:9090/app/ , and need to
access it via

Thus I configured the following, which works fine:

        location / {
             proxy_pass              http://localhost:9090/app/;

However now I need to access in my code the ""
variable. I thought passing it through an HTTP header:

        location / {
             proxy_set_header   Host             $host;
             proxy_redirect false;
             proxy_pass              http://localhost:9090/app/;

and I manage to get the header "Host", but its value is
"localhost:9090". Also tried with $proxy_host.

How can I get the value "" in the Host HTTP header?


Posted via

More information about the nginx mailing list