分享

apache2.4.4启用deflate压缩

 corefashion 2014-10-27

今天在看《高性能php应用开发》这本书,说道如何启用mod_deflate:

启用如下模块:

LoadModule deflate_module modules/mod_deflate.so

然后加入指令:

AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/javascript

即可。

但是发现老是出错,

 Invalid command 'AddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration 

去百度查看下,未果,之后发现官方有段话:

Invalid command 'AddOutputFilterByType', perhaps misspelled       or defined by a module not included in the server configuration        -AddOutputFilterByType       has moved from the core to mod_filter, which must be loaded.

原来,除了启用deflate之外,还要启用mod_filter,找到这句:

LoadModule filter_module modules/mod_filter.so

去除前面的分号,终于好了!

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多