IP address of fastcgi server?

Maxim Dounin mdounin at mdounin.ru
Tue Oct 12 15:04:15 MSD 2010


Hello!

On Tue, Oct 12, 2010 at 06:53:32AM -0400, Ilan Berkner wrote:

> Someone else suggested:
> 
> fastcgi_param UPS_SERVER_ADDR $upstream_addr;
> 
> and get $_SERVER["UPS_SERVER_ADDR"].
> 
> ?

No, this won't work due to reasons I already outlined:

[...]

> > Moreever, upstream's address (fastcgi application address in your
> > case) isn't available when nginx creates request to upstream (as
> > particular upstream server isn't selected yet, and even after
> > selection it may change due to proxy_next_upstream).

[...]

Variable $upstream_addr will be empty during creation request to 
upstream.

And just a side note: variable $upstream_addr contains not a 
single address, but a list of upstream addresses tried.

Maxim Dounin



More information about the nginx mailing list