<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michael`s blog &#187; accesslog</title>
	<atom:link href="http://www.toplee.com/blog/tag/accesslog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.toplee.com/blog</link>
	<description>活到老，学到老 ...   @ IT，业界，互联网</description>
	<lastBuildDate>Wed, 01 Sep 2010 03:48:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>squid后面的lighttpd日志记录用户ip的方法</title>
		<link>http://www.toplee.com/blog/348.html</link>
		<comments>http://www.toplee.com/blog/348.html#comments</comments>
		<pubDate>Mon, 08 Jan 2007 15:54:55 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Web架构/负载/性能]]></category>
		<category><![CDATA[accesslog]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[mod_proxy]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://www.toplee.com/blog/archives/348.html</guid>
		<description><![CDATA[默认在lighttpd的accesslog里面无法记录透过squid或者apache的mod_proxy过来的用户ip地址，全都会记录到squid或者apache机器的ip地址，但是httpd头里面的用户ip其实是发送到lighttpd的，可以通过修改accesslog.format来达到目的，下面是我的格式，跟combined兼容： accesslog.format&#160; = &#34;%{X-Forwarded-For}i %v %u %t \&#34;%r\&#34; %s %b&#160; \&#34;%{User-Agent}i\&#34; \&#34;%{Referer}i\&#34;&#34; 其中&#8221;%{X-Forwarded-For}i 就是记录了用户来源的ip地址]]></description>
			<content:encoded><![CDATA[<p>默认在lighttpd的accesslog里面无法记录透过squid或者apache的mod_proxy过来的用户ip地址，全都会记录到squid或者apache机器的ip地址，但是httpd头里面的用户ip其实是发送到lighttpd的，可以通过修改accesslog.format来达到目的，下面是我的格式，跟combined兼容：</p>
<div class="hl-surround"><div class="hl-main">accesslog.format&nbsp; = &quot;%{X-Forwarded-For}i %v %u %t \&quot;%r\&quot; %s %b&nbsp; \&quot;%{User-Agent}i\&quot; \&quot;%{Referer}i\&quot;&quot;</div></div>
<p>其中&#8221;%{X-Forwarded-For}i 就是记录了用户来源的ip地址</p>
]]></content:encoded>
			<wfw:commentRss>http://www.toplee.com/blog/348.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
