Welcome! Log In Create A New Profile

Advanced

Setting remote addr to contents of header

Paul Dlug
April 15, 2009 06:37PM
I'm running nginx beyind a L7 proxy (haproxy), I have haproxy setting
the X-Forwarded-For header and I'm using this to log the real IP of
the client and pass it to other processes that I'm proxying with nginx
(mongrels, apache, etc.). This works just great but I would like to be
able to use nginx directives to control access (allow, deny, etc.).
These don't work since nginx itself sees the remote_addr as the IP of
the haproxy server.

Any suggestions? I would think a solution like mod_rpaf for apache
would be ideal.


Thanks,
Paul
Subject Author Posted

Setting remote addr to contents of header

Paul Dlug April 15, 2009 06:37PM

Re: Setting remote addr to contents of header

Maxim Dounin April 15, 2009 06:52PM

Re: Setting remote addr to contents of header

Paul Dlug April 16, 2009 12:52AM

Re: Setting remote addr to contents of header

Anton Yuzhaninov April 16, 2009 03:38AM

Re: Setting remote addr to contents of header

Maxim Dounin April 16, 2009 04:20AM

Re: Setting remote addr to contents of header

Paul Dlug April 16, 2009 04:37AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 253
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready