Keep client ip address

Igor Sysoev is at
Sun Dec 31 00:07:10 MSK 2006

On Sat, 30 Dec 2006, Guillermo Fernandez Castellanos wrote:

> 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;
>           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
> And it works like a charm.
> I don't know if changing the log format is the cleanest solution, but
> for my simple setup mod_rpaf is a bit overkill and the log change just
> works (kiss).

The mod_rpaf also set a real client address for several Apache modules such as
mod_status (/server-status), mod_access (Allow/Deny) and logging module.

Igor Sysoev

More information about the nginx mailing list