upstream host name or address

torajx nginx-forum at nginx.us
Sun Jun 19 15:26:58 MSD 2011


hi,
is it possible to find upstream host which serves as proxy for a
connection;
i know that $upstream_addr is the key ; but i need to set the address
with set_proxy_headdr as host
but $upstream_addr return address and port together

upstream test
{
ip_hash;
192.168.1.1;
192.168.1.2;
}

location /
{
proxy_set_header Host $upstream_addr;  ---------> fail cause it set for
example 192.168.1.1:80 but i need 192.168.1.1
proxy_pass http://test;
}


any suggestion ?

thank you in advance..

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,208188,208188#msg-208188




More information about the nginx mailing list