remote_addr not set using x-real-ip

Francis Daly francis at
Mon Jan 26 20:11:17 UTC 2015

On Mon, Jan 26, 2015 at 09:29:17PM +0800, ron ramos wrote:

Hi there,

> I would just like to check what mistake i did on implementing real-ip
> module.

>     real_ip_recursive  on;

That says "tell me the last untrusted address from the list".

>     set_real_ip_from;

But that says "no address on the list is untrusted".

So nginx will do something else -- probably tell you the first address
from the list. It's no wronger than anything else, given what you have
configured it to do.

Either turn off recursive, or configure your trusted addresses correctly.

Francis Daly        francis at

More information about the nginx mailing list