Varnish (reverse proxy) + nginx with php and REMOTE_ADDR issue.

Rob Schultz rschultz7 at gmail.com
Mon Jan 4 01:00:59 MSK 2010


No use
http://wiki.nginx.org/NginxHttpRealIpModule#real_ip_header
put this into either the in the http, server or you location section.

set_real_ip_from 127.0.0.1;  (or what ever your varnish ip address is)
real_ip_header X-Forwarded-For;

and just leave it as fastcgi_param REMOTE_ADDR   $remote_addr;

V/r,
Rob

On Jan 3, 2010, at 3:50 PM, Piotr Karbowski wrote:

> I saw that but I don't understand how can I use it in fastcgi_parms.
> 
> fastcgi_param  REMOTE_ADDR        $real_ip_header;
> 
> This can work?
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx




More information about the nginx mailing list