apache gzip页面压缩
来源:互联网 发布:淘宝集市信用贷款客服 编辑:程序博客网 时间:2024/05/16 18:37
mod_gzip的安装:
修改Makefile中的 apxs路径:然后make make install
配置:mod_gzip+mod_php
LoadModule gzip_module modules/mod_gzip.so
...
AddModule mod_gzip.c
...
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_minimum_file_size 1000
mod_gzip_maximum_file_size 300000
mod_gzip_item_include file /.htm$
mod_gzip_item_include file /.html$
mod_gzip_item_include file /.php$
mod_gzip_item_include file /.php3$
mod_gzip_item_include mime text/.*
mod_gzip_item_include mime httpd/unix-directory
# mod_gzip的临时工作目录: 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_include file /.html$
mod_gzip_item_include mime text/.*
mod_gzip_item_include mime httpd/unix-directory
mod_gzip_item_include 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_include file /.html$
mod_gzip_item_include file /.asp$
mod_gzip_item_include file /.aspx$
mod_gzip_item_include mime text/.*
mod_gzip_item_include mime httpd/unix-directory
mod_gzip_item_include 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_install.html
*******************************************************************************
tomcat下gzip配置
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/html,text/xml"
/>
- apache gzip页面压缩
- apache 2.2.15中配置mod_deflate 页面gzip压缩
- apache开启gzip压缩
- apache开启gzip压缩
- apache 开启gzip压缩
- Apache资源gzip压缩
- Apache 开启Gzip 压缩
- apache gzip压缩设置
- apache 启用 gzip压缩
- Apache 开启gzip压缩
- Apache开启GZIP压缩
- Apache开启GZIP压缩
- apache开启 gzip 压缩
- apache开启GZIP压缩
- 使用gzip压缩页面
- jsp页面压缩 gzip
- gzip页面压缩
- 启用页面Gzip压缩
- 输入法 Fcitx的美化方案 及如何关闭联想功能
- php-fpm 的重启、终止操作命令
- 不常用但很有用的网络测试命令
- iPhone应用程序名称本地化
- 有的网页下载时 并不想用迅雷下载,但是它总是提示,怎么办
- apache gzip页面压缩
- apache 自带压力测试工具 windows下使用(-c 不大于100)
- 禁止按回车提交
- 在ASP.NET中使用Session常见问题集锦
- 我的书单(不断更新中)
- java中的堆(heap)和栈(stack)-详解
- java webservice 调用
- iphone应用中的动画效果之loading效果和界面切换效果
- Linux 添加 rar和7z支持