<?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>风叶 &#187; 代理服务器</title>
	<atom:link href="http://blog.myhnet.cn/tag/%e4%bb%a3%e7%90%86%e6%9c%8d%e5%8a%a1%e5%99%a8/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.myhnet.cn</link>
	<description>秋湍泻石髓 风叶聚云根</description>
	<lastBuildDate>Fri, 20 Aug 2010 15:05:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>squid 2.6及更新版本的透明代理设置（web cache, 网页加速）</title>
		<link>http://blog.myhnet.cn/2008/07/08/squid-26%e5%8f%8a%e6%9b%b4%e6%96%b0%e7%89%88%e6%9c%ac%e7%9a%84%e9%80%8f%e6%98%8e%e4%bb%a3%e7%90%86%e8%ae%be%e7%bd%ae%ef%bc%88web-cache-%e7%bd%91%e9%a1%b5%e5%8a%a0%e9%80%9f%ef%bc%89/</link>
		<comments>http://blog.myhnet.cn/2008/07/08/squid-26%e5%8f%8a%e6%9b%b4%e6%96%b0%e7%89%88%e6%9c%ac%e7%9a%84%e9%80%8f%e6%98%8e%e4%bb%a3%e7%90%86%e8%ae%be%e7%bd%ae%ef%bc%88web-cache-%e7%bd%91%e9%a1%b5%e5%8a%a0%e9%80%9f%ef%bc%89/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 10:04:29 +0000</pubDate>
		<dc:creator>myhnet</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[安装配置]]></category>
		<category><![CDATA[网页加速]]></category>
		<category><![CDATA[透明代理]]></category>
		<category><![CDATA[squid]]></category>
		<category><![CDATA[web cache]]></category>
		<category><![CDATA[代理服务器]]></category>

		<guid isPermaLink="false">http://blog.myhnet.cn/2008/07/08/squid-26%e5%8f%8a%e6%9b%b4%e6%96%b0%e7%89%88%e6%9c%ac%e7%9a%84%e9%80%8f%e6%98%8e%e4%bb%a3%e7%90%86%e8%ae%be%e7%bd%ae%ef%bc%88web-cache-%e7%bd%91%e9%a1%b5%e5%8a%a0%e9%80%9f%ef%bc%89/</guid>
		<description><![CDATA[前段时间由于需要，要搭建一个web-cache服务器，开始打算用apache的mod_proxy来实现，结果发现在对URL的处理上，很让我们难看。 比如，我们我们的proxy地址是：cache.test.com，实际的地址是：www.test.com 下面的代码： &#60;a href=&#34;/index.php&#34;&#62;something&#60;/a&#62; 点击something时， 他居然给他链接到的还是http://www.test.com/index.php，而不是我期望的http://cache.test.com/index.php 而且，就效率来说，这个不是很理想。 后来，我们改用专业的squid来做这个 不过，在网上找了很多资源，都是squid2.5或者以前的版本，在squid.conf里面的定义根本就不一样。特别是国内的资料，都陈旧的不行了。找到的东西，在2.6里面根本就不能用。 最后，在这个地方找到了相关的资料 http://www.deckle.co.za/squid-users-guide/Accelerator_Mode#Accelerator_Configuration_Options 原来，从squid2.6开始，就全面不支持httpd_accel_*系统的定义，而将其全部更在了http_port的选项里面了（说实在的，现在的squid配置文件看起来比以前规范多了，以前我一看就头通，现在有条理多了）。 最简单的透明代理，我们只需要写下这句一句： http_port 80 transparent 然后，将你要访问的网站指向这个squid服务器所在的地址就OK了 如果你要用来做专门一个网站的cache server，则可以用defaultsite选项，比如： http_port 80 defaultsite=www.test.com 这样的话，不管你要通过个我proxy server访问什么网站，都会被转发到www.test.com，不是专用的web cache建议别用 其他的需求的话，还是可以用acl来控制的]]></description>
			<content:encoded><![CDATA[<p>前段时间由于需要，要搭建一个web-cache服务器，开始打算用apache的mod_proxy来实现，结果发现在对URL的处理上，很让我们难看。</p>
<p>比如，我们我们的proxy地址是：cache.test.com，实际的地址是：www.test.com<br />
下面的代码：</p>
<div class="hl-surround"><div class="hl-main">&lt;a href=&quot;/index.php&quot;&gt;something&lt;/a&gt;</div></div>
<p>点击something时，<br />
他居然给他链接到的还是http://www.test.com/index.php，而不是我期望的http://cache.test.com/index.php<br />
而且，就效率来说，这个不是很理想。</p>
<p>后来，我们改用专业的squid来做这个</p>
<p>不过，在网上找了很多资源，都是squid2.5或者以前的版本，在squid.conf里面的定义根本就不一样。特别是国内的资料，都陈旧的不行了。找到的东西，在2.6里面根本就不能用。</p>
<p>最后，在这个地方找到了相关的资料<br />
<a href="http://www.deckle.co.za/squid-users-guide/Accelerator_Mode#Accelerator_Configuration_Options">http://www.deckle.co.za/squid-users-guide/Accelerator_Mode#Accelerator_Configuration_Options</a></p>
<p>原来，从squid2.6开始，就全面不支持httpd_accel_*系统的定义，而将其全部更在了http_port的选项里面了（说实在的，现在的squid配置文件看起来比以前规范多了，以前我一看就头通，现在有条理多了）。</p>
<p>最简单的透明代理，我们只需要写下这句一句：</p>
<div class="hl-surround"><div class="hl-main">http_port 80 transparent</div></div>
<p>然后，将你要访问的网站指向这个squid服务器所在的地址就OK了</p>
<p>如果你要用来做专门一个网站的cache server，则可以用defaultsite选项，比如：</p>
<div class="hl-surround"><div class="hl-main">http_port 80 defaultsite=www.test.com</div></div>
<p>这样的话，不管你要通过个我proxy server访问什么网站，都会被转发到www.test.com，不是专用的web cache建议别用</p>
<p>其他的需求的话，还是可以用acl来控制的</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.myhnet.cn/2008/07/08/squid-26%e5%8f%8a%e6%9b%b4%e6%96%b0%e7%89%88%e6%9c%ac%e7%9a%84%e9%80%8f%e6%98%8e%e4%bb%a3%e7%90%86%e8%ae%be%e7%bd%ae%ef%bc%88web-cache-%e7%bd%91%e9%a1%b5%e5%8a%a0%e9%80%9f%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
