nginx not setting REMOTE_ADDR properly?

Abhishek Singh abhishek.rhce at gmail.com
Thu Mar 5 07:38:49 MSK 2009


Yes you have to use $http_x_forwarded_for for it.

On Thu, Mar 5, 2009 at 9:59 AM, Mohammad Kolahdouzan <mohammad_ysm at yahoo.com
> wrote:

>
> I monitored the HTTP headers of the requests that are forwarded to Nginx by
> the load balancer using tcpdump, and I can clearly see that the remote IP is
> added to the headers as a new header "REMOTE ADDR:", still use
> $http_x_forwarded_for it?
>
> Thanks,
> -M
>
>
> ------------------------------
> *From:* Abhishek Singh <abhishek.rhce at gmail.com>
> *To:* nginx at sysoev.ru
> *Sent:* Wednesday, March 4, 2009 7:06:18 PM
> *Subject:* Re: nginx not setting REMOTE_ADDR properly?
> - Show quoted text -
>
> Use "$http_x_forwarded_for" to log client real ip address.
>
> On Thu, Mar 5, 2009 at 8:22 AM, Mohammad Kolahdouzan <
> mohammad_ysm at yahoo.com> 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?
>>
>> -M
>>
>>
>>
>
>
>
>


-- 
Abhishek Kumar Singh
ibibo web pvt. ltd.

www.ibibo.com

Mob: +91-9810848283
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090305/f992d0fb/attachment.html>


More information about the nginx mailing list