Keep client ip address

Aleksandar Lazic al-nginx at
Sun Dec 31 00:09:23 MSK 2006


On Sam 30.12.2006 21:57, Guillermo Fernandez Castellanos wrote:
>Thanks Aleksandar and Igor for your answers.
>Eventually I've removed all references to real_ip, added those lines:
>            proxy_set_header        Host             $host;
>            proxy_set_header        X-Real-IP        $remote_addr;
I think this line isn't needed if you use X-Forwarded-For ;-)

>   proxy_set_header        X-Forwarded-For  $proxy_add_x_forwarded_for;

>and defined a new log format for my apache server with %{X-Forwarded-For}i

This is like a standard for apache behind a proxy ;-)

>I've been surprised by how quickly I got a (correct and helpful)
>answer. Again, thanks a lot.

That was also my first positive suprise, that's one of the reason why I
like nginx ;-)

>Happy new year,

Thanks && also to you ;-)



More information about the nginx mailing list