[[email protected] httpd-2.2.16]# /application/apache/bin/httpd -l
Compiled in modules:
.................
mod_deflate.c
.................
######################################
二、在Apache中开启gzip压缩
打开Apache配置文件,然后添加mod_deflate.so模块
vi /application/apache/conf/extra/httpd-vhosts.conf
标准的:
ServerAlias
#####需要添加的内容 ###
<ifmodule mod_deflate.c>
DeflateCompressionLevel 9
SetOutputFilter DEFLATE
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
#LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
#CustomLog logs/deflate_log.log deflate
</ifmodule>
##############################
ErrorLog
三、重启Apache
/application/apache/bin/apachectl -t
/application/apache/bin/apachectl graceful
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。