<?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>Shining Ray &#187; squid</title>
	<atom:link href="http://shiningray.cn/tag/squid/feed" rel="self" type="application/rss+xml" />
	<link>http://shiningray.cn</link>
	<description>一缕阳光</description>
	<lastBuildDate>Mon, 21 Jun 2010 07:11:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Squid 2.6做反向代理的WWW-Authentication无法通过问题</title>
		<link>http://shiningray.cn/squid26.html</link>
		<comments>http://shiningray.cn/squid26.html#comments</comments>
		<pubDate>Fri, 06 Apr 2007 18:17:54 +0000</pubDate>
		<dc:creator>ShiningRay</dc:creator>
				<category><![CDATA[日记]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://shiningray.cn/2007/11/13/squid26/</guid>
		<description><![CDATA[以前一直用Squid 2.5做Apache的反向代理来优化Web服务器性能，后来尝试了Squid 2.6，Squid 2.6确实更加灵活和强大，但一直有个问题困扰我，就是当Apache需要WWW-Authentication的验证的时候，如果使用了Squid 2.6，那么Apache总是无法得到这个值，最近研究了一下，终于找到解决方案，在声明cache_peer的时候，Squid2.6可以向Cache Peer发送一些验证信息来登录到一些需要身份验证的服务器，就包括这WWW-Authentication信息。如果要求Squid2.6传递这个信息，那么必须使用在cache_peer加上login=PASS这样的参数，就可以将这个HTTP头传递给上游服务器，例如： cache_peer 127.0.0.1 parent 80 0 no-query originserver login=PASS 特此备忘]]></description>
			<content:encoded><![CDATA[<p>以前一直用Squid 2.5做Apache的反向代理来优化Web服务器性能，后来尝试了Squid 2.6，Squid  2.6确实更加灵活和强大，但一直有个问题困扰我，就是当Apache需要WWW-Authentication的验证的时候，如果使用了Squid  2.6，那么Apache总是无法得到这个值，最近研究了一下，终于找到解决方案，在声明cache_peer的时候，Squid2.6可以向Cache  Peer发送一些验证信息来登录到一些需要身份验证的服务器，就包括这WWW-Authentication信息。如果要求Squid2.6传递这个信息，那么必须使用在cache_peer加上login=PASS这样的参数，就可以将这个HTTP头传递给上游服务器，例如：</p>
<blockquote><p> cache_peer  127.0.0.1 parent 80 0 no-query originserver login=PASS</p></blockquote>
<p>特此备忘</p>
]]></content:encoded>
			<wfw:commentRss>http://shiningray.cn/squid26.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squid 2.6配置的注意事项</title>
		<link>http://shiningray.cn/squid26-2.html</link>
		<comments>http://shiningray.cn/squid26-2.html#comments</comments>
		<pubDate>Wed, 20 Sep 2006 10:32:16 +0000</pubDate>
		<dc:creator>ShiningRay</dc:creator>
				<category><![CDATA[日记]]></category>
		<category><![CDATA[squid]]></category>

		<guid isPermaLink="false">http://shiningray.cn/2007/09/20/squid26-2/</guid>
		<description><![CDATA[前一阶段Squid推出了2.6版，在缓存机制上有了更好的统一，将反向代理和正向代理统一在了一起，但是也有一些问题。 第一是反向代理配置方式改变了，去掉了httpd_accel_*这些配置，而改用http_port和cache_peer等配置来完成，例如： http_port &#60;ip&#62;:&#60;port&#62; defaultsite=&#60;hostname&#62; [vhost] [vport] cache_peer 127.0.0.1 parent 80 0 no-query originserver 有了这两条，就可以实现反向代理了 第二如果Apache有身份验证的话，Squid 2.6可能并不会将Authorization的HTTP头发送给Apache，所以我在Squid 2.6后配置Apache + Subversion就无法使用身份验证——这个目前还没办法解决。 第三是Squid 2.6的基于IP的反向代理服务器的配置改变，也就是Squid 2.5中的httpd_accel_host virtual，在Squid 2.6的方法是命名多个parent、originserver的cache_peer，然后配合cache_peer_domain来指定对不同域名发送到不同的上游服务器； cache_peer 192.168.0.3 parent 80 0 no-query originserver name=a cache_peer 192.168.0.4 parent 80 0 no-query originserver name=b cache_peer_domain a .example.com cache_peer_domain b .test.com 需要注意的是，每个cache_peer都必须至少有一个cache_peer_domain分配到其上，才能真正实现类似virtual的配置。]]></description>
			<content:encoded><![CDATA[<p>前一阶段Squid推出了2.6版，在缓存机制上有了更好的统一，将反向代理和正向代理统一在了一起，但是也有一些问题。<br />
第一是反向代理配置方式改变了，去掉了httpd_accel_*这些配置，而改用http_port和cache_peer等配置来完成，例如：</p>
<blockquote><pre>http_port  &lt;ip&gt;:&lt;port&gt; defaultsite=&lt;hostname&gt; [vhost] [vport]
cache_peer 127.0.0.1  parent 80 0 no-query originserver</pre>
</blockquote>
<p>有了这两条，就可以实现反向代理了<br />
第二如果Apache有身份验证的话，Squid  2.6可能并不会将Authorization的HTTP头发送给Apache，所以我在Squid 2.6后配置Apache +  Subversion就无法使用身份验证——这个目前还没办法解决。<br />
第三是Squid 2.6的基于IP的反向代理服务器的配置改变，也就是Squid  2.5中的httpd_accel_host virtual，在Squid  2.6的方法是命名多个parent、originserver的cache_peer，然后配合cache_peer_domain来指定对不同域名发送到不同的上游服务器；</p>
<blockquote><pre>cache_peer  192.168.0.3 parent 80 0 no-query originserver name=a
cache_peer 192.168.0.4  parent 80 0 no-query originserver name=b
cache_peer_domain a  .example.com
cache_peer_domain b  .test.com</pre>
</blockquote>
<p>需要注意的是，每个cache_peer都必须至少有一个cache_peer_domain分配到其上，才能真正实现类似virtual的配置。</p>
]]></content:encoded>
			<wfw:commentRss>http://shiningray.cn/squid26-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
