Host header in upstream requests

Dmitry Pryadko dp at nginx.com
Mon Mar 16 08:34:36 UTC 2015


I don't think that something other than manual address-hostname pairs 
maintainance can help you

map $upstream_addr $upstream_hostname {
     10.0.0.1:80 hostname1;
     10.0.0.2:80 hostname2;
}
...
proxy_set_header Host $upstream_hostname;

15.03.15 17:19, sapientcloud пишет:
> Already tried $upstream_addr which unfortunately gives IP:port instead of
> hostname:port. My upstream needs hostname listed in conf instead of IP
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,257252,257258#msg-257258
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>

-- 
br,
Dmitry Pryadko



More information about the nginx mailing list