,关注apache2.2 deflate模块的启用不成功
求助,关注apache2.2 deflate模块的启用不成功。
服务器操作系统是win2003 , 部署网站使用apache + tomgcat + mod_jk
现在的需求是要启用网页压缩,在通俗的说就是站长工具查出来是网页已压缩。
通过google查到一些资料,要先编译haflate 和 headers模块,但我发现我的apache已经有这两个模块,所以只用修改httpd配置文件就可以,我按照别人写好的代码贴上去,重启apache没反应。
现在添加的配置如下,网上能搜到的都试过了都不行。
另外日志文件没有任何相关的记录
请教呀。。。急
------解决方案--------------------
改tomcat配置文件最头疼了,我也不会啊
------解决方案--------------------
接分。
服务器操作系统是win2003 , 部署网站使用apache + tomgcat + mod_jk
现在的需求是要启用网页压缩,在通俗的说就是站长工具查出来是网页已压缩。
通过google查到一些资料,要先编译haflate 和 headers模块,但我发现我的apache已经有这两个模块,所以只用修改httpd配置文件就可以,我按照别人写好的代码贴上去,重启apache没反应。
现在添加的配置如下,网上能搜到的都试过了都不行。
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
<Location />
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>
另外日志文件没有任何相关的记录
请教呀。。。急
------解决方案--------------------
改tomcat配置文件最头疼了,我也不会啊
------解决方案--------------------