IP address of fastcgi server?

Ilan Berkner iberkner at gmail.com
Tue Oct 12 23:24:10 MSD 2010

Unfortunately, that does not work per previous posts, that only shows the
front facing web server address...

We have a work around, thanks.

A small configuration file on each server can be read by the php code to
identify which machine it is.

On Tue, Oct 12, 2010 at 2:59 PM, Ian Hobson <ian at ianhobson.co.uk> wrote:

> On 12/10/2010 02:41, Ilan Berkner wrote:
>> Hi All,
>> We're doing some profiling and one of the parameters we'd like to get is
>> the IP address of the fastcgi (in this case php-fpm) server that
>> processed the request.  PHP $_SERVER['server_addr'] returns the external
>> address of the nginx server per our fastcgi configuration:
>> fastcgi_param  SERVER_ADDR        $server_addr;
>> Is this correct behavior? is there a way to get the local address of the
>> server processing the php request?
>>  You can obtain the IP address of the machine running the script with
> $_server['SERVER_ADDR']
> Regards
> Ian
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20101012/43b69b93/attachment.html>

More information about the nginx mailing list