<?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>Sparkle&#039;s Workshop &#187; nginx</title>
	<atom:link href="http://weavesky.com/tag/nginx/feed/" rel="self" type="application/rss+xml" />
	<link>http://weavesky.com</link>
	<description></description>
	<lastBuildDate>Fri, 19 Feb 2010 09:26:13 +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后面的Nginx如何记录客户端IP</title>
		<link>http://weavesky.com/2008/07/17/nginx-log-remote-ip-behind-squid/</link>
		<comments>http://weavesky.com/2008/07/17/nginx-log-remote-ip-behind-squid/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 08:30:24 +0000</pubDate>
		<dc:creator>Sparkle</dc:creator>
				<category><![CDATA[互联网]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://weavesky.com/?p=549</guid>
		<description><![CDATA[（这是我在去年12月的时候查到的资料，不知道现在nginx的文档有没有更完善） 通常我们会在web server前面部署squid，这个时候web server的所有请求都是来自squid，那我们的web server的日志记录到的所有请求都是squid服务器的IP。这个时候，我们会让squid发出一个X-Forwarded-For的header包含真正客户端的IP，我们需要修改web server的日志记录字段用header X-Forwarded-For代替remote_ip，apache的修改方法很简单，这里就不说了。 这里要说的是nginx的修改方法，其实原理很简单，但是nginx的文档里面完全没有提及怎么拿某个header，ft。最后还是在maillist找到答案的 http://thread.gmane.org/gmane.comp.web.nginx.english/944/focus=946 All client headers are available as $http_&#8230; variables. For example, &#8220;X-Strange-Header&#8221; as $http_x_strange_header. 剩下的就很简单了 Apache、Nginx、Lighttpd对比]]></description>
			<content:encoded><![CDATA[<p>（这是我在去年12月的时候查到的资料，不知道现在nginx的文档有没有更完善）<br />
通常我们会在web server前面部署squid，这个时候web server的所有请求都是来自squid，那我们的web server的日志记录到的所有请求都是squid服务器的IP。这个时候，我们会让squid发出一个X-Forwarded-For的header包含真正客户端的IP，我们需要修改web server的日志记录字段用header X-Forwarded-For代替remote_ip，apache的修改方法很简单，这里就不说了。<br />
这里要说的是nginx的修改方法，其实原理很简单，但是nginx的文档里面完全没有提及怎么拿某个header，ft。最后还是在maillist找到答案的</p>
<p>http://thread.gmane.org/gmane.comp.web.nginx.english/944/focus=946</p>
<blockquote><p>
All client headers are available as $http_&#8230; variables.<br />
For example, &#8220;X-Strange-Header&#8221; as $http_x_strange_header.
</p></blockquote>
<p>剩下的就很简单了</p>
<ul class="related_post"><li><a href="http://weavesky.com/2007/12/18/apache-nginx-lighttpd/" title="Apache、Nginx、Lighttpd对比">Apache、Nginx、Lighttpd对比</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://weavesky.com/2008/07/17/nginx-log-remote-ip-behind-squid/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Apache、Nginx、Lighttpd对比</title>
		<link>http://weavesky.com/2007/12/18/apache-nginx-lighttpd/</link>
		<comments>http://weavesky.com/2007/12/18/apache-nginx-lighttpd/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 15:00:23 +0000</pubDate>
		<dc:creator>Sparkle</dc:creator>
				<category><![CDATA[互联网]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://69.197.153.196/?p=522</guid>
		<description><![CDATA[Apache * 经典的Web服务器 * 除了慢没有别的缺点了 * 对了，Apache2对fcgi支持并不好 * 非常好用的proxy和proxy_ajp（很多人用它作为tomcat的前端） * 不支持epoll（这年头，epoll几乎是性能的必备） Nginx * 速度快，占用资源少 * 杀手级的proxy和rewrite * 非常不错的静态文件能力 * 最适合作为整个网站的前端服务（将php、svn等不同请求发送往后端apache） * 其他功能马马虎虎 Lighttpd * 杀手级的静态文件能力 * 杀手级的fcgi能力 * 不稳定的proxy模块 总体来说，如果你不确定应该用什么服务器，那就应该用Apache 但是稍微可以配置多个服务的情况下，做一个Nginx在最前端，然后把需要的功能转发给Apache是最好的选择 如果你打算跑fcgi，Lighttpd是不二的选择 如果你打算做图片服务器，独立的Lighttpd也是很好的选择 在Squid后面的Nginx如何记录客户端IP]]></description>
			<content:encoded><![CDATA[<p>Apache</p>
<p>* 经典的Web服务器<br />
* 除了慢没有别的缺点了<br />
* 对了，Apache2对fcgi支持并不好<br />
* 非常好用的proxy和proxy_ajp（很多人用它作为tomcat的前端）<br />
* 不支持epoll（这年头，epoll几乎是性能的必备）</p>
<p>Nginx</p>
<p>* 速度快，占用资源少<br />
* 杀手级的proxy和rewrite<br />
* 非常不错的静态文件能力<br />
* 最适合作为整个网站的前端服务（将php、svn等不同请求发送往后端apache）<br />
* 其他功能马马虎虎</p>
<p>Lighttpd</p>
<p>* 杀手级的静态文件能力<br />
* 杀手级的fcgi能力<br />
* 不稳定的proxy模块</p>
<p>总体来说，如果你不确定应该用什么服务器，那就应该用Apache<br />
但是稍微可以配置多个服务的情况下，做一个Nginx在最前端，然后把需要的功能转发给Apache是最好的选择<br />
如果你打算跑fcgi，Lighttpd是不二的选择<br />
如果你打算做图片服务器，独立的Lighttpd也是很好的选择</p>
<ul class="related_post"><li><a href="http://weavesky.com/2008/07/17/nginx-log-remote-ip-behind-squid/" title="在Squid后面的Nginx如何记录客户端IP">在Squid后面的Nginx如何记录客户端IP</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://weavesky.com/2007/12/18/apache-nginx-lighttpd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
