<span class="kw2">set</span>&nbsp;&nbsp; <span class="kw4">X-Forwarded-For</span>&nbsp; <span class="re0">$add_x_forwarded_for</span>;<br>use <span class="re0">$add_x_forwarded_for for log_format and any configure options</span><br><br><div class="gmail_quote">
On Tue, Feb 26, 2008 at 11:41 PM, <a href="mailto:rkmr.em@gmail.com">rkmr.em@gmail.com</a> &lt;<a href="mailto:rkmr.em@gmail.com">rkmr.em@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
how do i get the x-forwarded-for ip address in server access logs?<br>
i tried this log format in the server section, but i still get the default logs<br>
<br>
how to fix this?<br>
thanks<br>
<br>
<br>
 &nbsp; &nbsp;server {<br>
 &nbsp; &nbsp; &nbsp; &nbsp;listen &nbsp; &nbsp; &nbsp; 8070;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;server_name &nbsp;.XX.com;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;log_format &nbsp;main &nbsp;&#39;$remote_addr - $remote_user [$time_local]<br>
$request &#39; &nbsp;&#39;&quot;$status&quot; $body_bytes_sent &quot;$http_referer&quot;&#39;<br>
&#39;&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;&#39; &nbsp; &#39;&quot;$gzip_ratio&quot;<br>
&quot;$upstream_status&quot; &quot;$upstream_response_time&quot; &quot;$upstream_addr&quot;&#39;;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;access_log &nbsp;logs/access_pop.log;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;error_log &nbsp;logs/error_pop.log;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;location / {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;root &nbsp; /home/mark/work/pop;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fastcgi_pass backend_pop;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;include /home/mark/work/infrastructure/nginx_fastcgi.conf;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; }<br>
<br>
</blockquote></div><br><br clear="all"><br>Please excuse my bad english...<br><br>С уважение,<br>Й. Георгиев.<br><br>WEB: <a href="http://gigavolt-bg.net/">http://gigavolt-bg.net/</a><br>Blog: &nbsp;<a href="http://live.gigavolt-bg.net/">http://live.gigavolt-bg.net/</a>