Apache2.4 开启Gzip功能
1.打开Apache配置文件(httpd.conf)2.去掉(#LoadModule deflate_module modules/mod_deflate.so)和(#LoadModule filter_module modules/mod_filter.so)前面的#号
3.然后再最后面加上:
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
DeflateCompressionLevel 6
AddOutputFilterByType DEFLATE text/html text/css image/gif image/jpeg image/png application/x-javascript
</IfModule>
注:6是压缩级别,1~9,数字越大对服务器消耗越大
页:
[1]