Correct IP in access log

mike mike503 at
Tue Sep 30 05:00:44 MSD 2008

On Mon, Sep 29, 2008 at 5:58 PM, mike <mike503 at> wrote:

> you need to configure the backend nginx to "trust" the header of the
> frontend using "set_real_ip_from"

Oops, minor correction. You need to set both of these. Igor has
written a patch for latest 0.7.x (and who knows what other versions
work) to allow -any- header to be used as the "real ip", otherwise an
unaltered nginx can use either X-Forwarded-For or X-Real-IP.

real_ip_header X-Forwarded-For;

You also need to make sure the "realip" module is enabled. Not sure if
it's own by default.

More information about the nginx mailing list