windows下apache开启gzip压缩 加快网页下载速度
针对windows版本的apache2.2,开启方法如下:
第一步:
找到apache的配置文件httpd.conf,找到下面两行,将前面的 # 去掉.
LoadModule deflate_module modules/mod_deflate.soLoadModule expires_module modules/mod_expires.so
<IfModule mod_expires.c>ExpiresActive OnExpiresDefault "access plus 12 month"ExpiresByType text/html "access plus 12 months"ExpiresByType text/css "access plus 12 months"ExpiresByType image/gif "access plus 12 months"ExpiresByType image/jpeg "access plus 12 months"ExpiresByType image/jpg "access plus 12 months"ExpiresByType image/png "access plus 12 months"EXpiresByType application/x-shockwave-flash "access plus 12 months"EXpiresByType application/x-javascript "access plus 12 months"ExpiresByType video/x-flv "access plus 12 months"</IfModule><IfModule mod_deflate.c>SetOutputFilter DEFLATEAddOutputFilterByType DEFLATE text/html text/css image/gif image/jpeg image/png application/x-javascript</IfModule>