<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div><br>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?<br><br>Thanks,<br>-M<br><br></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Abhishek Singh &lt;abhishek.rhce@gmail.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> nginx@sysoev.ru<br><b><span style="font-weight: bold;">Sent:</span></b> Wednesday, March 4, 2009 7:06:18 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: nginx not
 setting REMOTE_ADDR properly?<br></font><br>
Use "$http_x_forwarded_for" to log client real ip address.<br><br><div class="gmail_quote">On Thu, Mar 5, 2009 at 8:22 AM, Mohammad Kolahdouzan <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:mohammad_ysm@yahoo.com" target="_blank" href="mailto:mohammad_ysm@yahoo.com">mohammad_ysm@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br>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?<br>
<br>-M<br><br></div><br>

      </div></blockquote></div><br><br clear="all"><br>
</div></div></div><br>

      </body></html>