apache2ctl -t -D DUMP_MODULES
httpd -t -D DUMP_MODULES
看是否有deflate_module.
您可以使用此站点验证mod_deflate:
MOD_DEFLATE测试
我的网站得到了一个不错的小报告,表明我节省了81%的带宽!
我同意“在什么上下文”中的评论,但要涵盖所有基础(除其他响应之外),您也可以运行;
a2enmod deflate
apache2ctl -M
说,我们需要精确。
如果您使用的是Debian,则可以这样启用此模式。
//List all available mods
cd /etc/apache2/mods-avaliable
//Enable module - if you need to enable another module, just replace "deflate"
a2enmod deflate
//restart apache
service apache2 restart
//Check that module is effectively enabled
cd /etc/apache2/mods-enabled
ls -al
to linux debian环境的全部