nginx not setting REMOTE_ADDR properly?
Igor Sysoev
is at rambler-co.ru
Thu Mar 5 18:29:13 MSK 2009
On Wed, Mar 04, 2009 at 06:52:50PM -0800, Mohammad Kolahdouzan wrote:
> My nginx is getting requests through a (NetScaler) load balancer, and $remote_addr is returning the load balancer's IP and not the real user's IP (which the load balancer sets as REMOTE_ADDR in the header). Any other attribute I should use to get the real user's IP?
You should use $http_remote_addr and set:
server {
underscores_in_headers on;
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list