Welcome! Log In Create A New Profile

Advanced

Getting FastCGI Upstream Information

Arie Karhendana
December 25, 2009 11:02AM
Hi all,

I think this is not nginx specific question per se, but seeing all
experts here, maybe this list is the right place to start.

We have an nginx & PHP FastCGI configuration, where nginx is run on
different server than the PHP backends. We employ upstream
load-balancing scheme like this:

upstream upstream-php {
fair;
server 10.0.0.41:9000;
server 10.0.0.42:9000;
.....
}

We want to know the address of PHP upstream that currently serve the
request, and send it to the backend using fastcgi_param. We tried
adding this to the configuration:

fastcgi_param UPSTREAM_ADDR $upstream_addr;

But the UPSTREAM_ADDR param is always empty.

Maybe I'm doing it wrong? Any clues?

TIA,
--
Arie Karhendana

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Getting FastCGI Upstream Information

Arie Karhendana December 25, 2009 11:02AM

Re: Getting FastCGI Upstream Information

Maxim Dounin December 25, 2009 11:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready