<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>https://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>https://jackxiang.com/post//</link>
<title><![CDATA[apache开启gzip的方法,安好apache后的编译gzip方法]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Web服务器]]></category>
<pubDate>Fri, 13 Jul 2012 11:45:37 +0000</pubDate> 
<guid>https://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	默认并没有开启gzip功能。需要修改apache的配置文件进行开启。<br/><br/>什么是gzip，开启gzip的好处。<br/>开启方法如下:<br/>1. httpd.conf中打开deflate_Module和headers_Module模块 VickieXu<br/>2. httpd.conf中添加: Vickie博客<br/><br/><textarea name="code" class="php" rows="15" cols="100">
&lt;IfModule deflate_module&gt;
&nbsp;&nbsp;&nbsp;&nbsp;SetOutputFilter DEFLATE
&nbsp;&nbsp;&nbsp;&nbsp;# Don’t compress images and other
&nbsp;&nbsp;&nbsp;&nbsp;SetEnvIfNoCase Request_URI .(?:gif&#124;jpe?g&#124;png)$ no-gzip dont-vary
&nbsp;&nbsp;&nbsp;&nbsp;SetEnvIfNoCase Request_URI .(?:exe&#124;t?gz&#124;zip&#124;bz2&#124;sit&#124;rar)$ no-gzip dont-vary
&nbsp;&nbsp;&nbsp;&nbsp;SetEnvIfNoCase Request_URI .(?:pdf&#124;doc)$ no-gzip dont-vary
&nbsp;&nbsp;&nbsp;&nbsp;AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
&nbsp;&nbsp;&nbsp;&nbsp;AddOutputFilterByType DEFLATE application/x-javascript
&lt;/IfModule&gt;
</textarea><br/><br/>首先查看apache是否加载了mod_deflate.so模块，如果没有需要安装加载。找到并下载和当前apache版本相同的源码文件，解压缩到/home目录下，在apache安装目录下执行：<br/>/usr/local/apache2/bin/apxs -i -c /home/httpd-2.0.63/modules/filters/mod_deflate.<br/>会自动在 httpd.conf添加<br/>LoadModule deflate_module modules/mod_deflate.so<br/><br/>/usr/local/httpd-2.2.10/bin/apachectl restart<br/>httpd: Syntax error on line 254 of /usr/local/httpd-2.2.10/conf/httpd.conf: module deflate_module is built-in and can&#039;t be loaded<br/>解决方案：出现这个情况，表明deflate_module模块是内建的，不用再调入,所以只需要把LoadModule *** 注释就可以了<br/><br/>Egg：<br/>/usr/local/httpd-2.2.10/bin/apxs -i -c /tmp/httpd-rebuild/httpd-2.2.10/modules/filters/mod_deflate.c <br/>chmod 755 /usr/local/httpd-2.2.10/modules/mod_deflate.so<br/><br/>怎么知道开启了Gzip呢？用Httpwatcher或者FireBug抓包如下：<br/>Content-Encoding&nbsp;&nbsp;gzip&nbsp;&nbsp;这个即是。<br/><br/>响应头信息原始头信息<br/>Accept-Ranges&nbsp;&nbsp;bytes<br/>Connection&nbsp;&nbsp;close<br/>Content-Encoding&nbsp;&nbsp;gzip<br/>Content-Length&nbsp;&nbsp;892<br/>Content-Type&nbsp;&nbsp;text/html; charset=GB2312<br/>Date&nbsp;&nbsp;Fri, 13 Jul 2012 12:02:08 GMT<br/>Server&nbsp;&nbsp;Apache<br/>Vary&nbsp;&nbsp;Accept-Encoding
]]>
</description>
</item><item>
<link>https://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] apache开启gzip的方法,安好apache后的编译gzip方法]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>