该操作是对apache2.4 以上设定gzip压缩
打开apache下的的conf
编辑 http.conf 文件

一下几行去掉注释 
LoadModule headers_module modules/mod_headers.so 
LoadModule deflate_module modules/mod_deflate.so 
LoadModule filter_module modules/mod_filter.so 

文件末尾加上

<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/json
</IfModule>

更多推荐

解决服务器页面Content Download加载时间过长