专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »web服务器 » apache服务器:使用Apache的mod_gzip对WEB服务器进行HTTP压缩优化 »正文

apache服务器:使用Apache的mod_gzip对WEB服务器进行HTTP压缩优化

来源: 发布时间:星期日, 2009年1月4日 浏览:12次 评论:0
作者: 车东 Email: chedongATbigfoot.com/chedongATchedong.com

写于:2003/09 最后更新: 03/16/2005 16:26:08
工作目录: mkdir /tmp/mod_gzip; chmod -R 777 mod_gzip
mod_gzip_temp_dir /tmp/mod_gzip
mod_gzip_dechunk Yes
mod_gzip_keep_workfiles No
</IfModule>

mod_gzip和mod_php配合:不要让mod_gzip和mod_php使用同个临时目录php_session存放目录可以通过 php.ini设置到session.save_path = /tmp/php_sess

mod_gzip和Resin配合:
从resin邮件列表上查到:要让mod_gzip在mod_caucho后加载否则mod_gzip不起作用
...othr modules
AddModule mod_so.c
AddModule mod_caucho.c
#notice: mod_gzip must load after mod_caucho
AddModule mod_gzip.c
AddModule mod_expires.c
...

配置:mod_gzip + resin
<IFModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 3000
mod_gzip_maximum_file_size 300000
mod_gzip_item_ file \.html$
mod_gzip_item_ mime text/.*
mod_gzip_item_ mime httpd/unix-directory
mod_gzip_item_ handler caucho-request
</IFModule>


配置:mod_gzip + mod_proxy 反相代理加速并压缩 IIS
注意要增加缺省文件编码属性映射
AddType text/html .asp
AddType text/html .aspx


<IFModule mod_gzip.c>

AddType text/html .asp
AddType text/html .aspx
mod_gzip_on Yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_minimum_file_size 3000
mod_gzip_maximum_file_size 300000
mod_gzip_item_ file \.html$
mod_gzip_item_ file \.asp$
mod_gzip_item_ file \.aspx$
mod_gzip_item_ mime text/.*
mod_gzip_item_ mime httpd/unix-directory
mod_gzip_item_ handler proxy-server
</IFModule>


参考资料:

mod_gzip下载
http://sourceforge.net/projects/mod-gzip/
mod_gzip项目首页
http://www.schroepl.net/projekte/mod_gzip/


Apache2 中mod_deflate:压缩率比mod_gzip略低
http://httpd.apache.org/docs-2.0/mod/mod_deflate.html


模块化安装Apache
http://www.chedong.com/tech/apache_.html


原文出处:<a href="http://www.chedong.com/tech/compress.html">http://www.chedong.com/tech/compress.html</a>


0

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: