apache2已经用mod_deflate代替了mod_gzip

apache2已经包含了mod_deflate

打开模组

  1. /usr/local/apache2/bin/apxs -i -c /yourpath/httpd-2.2.3/modules/filters/mod_deflate.c

httpd.conf添加

  1. LoadModule deflate_module modules/mod_deflate.so

如果想只压缩html,text,xml 如果下面配置:

  1. AddOutputFilterByType DEFLATE text/html text/plain text/xml

(更多…)