hxm2ym 发表于 2012-3-26 13:11:48

关于lnmpa gzip开启js css请教下军哥

军哥提示:

看了一下安装源码,编译参数里忘加启用的参数了
可以cd到httpd的源码目录/modules/filters/
然后/usr/local/apache/bin/apxs -i -c -a mod_deflate.c
再在httpd.conf里加上
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml text/javascript
DeflateCompressionLevel 9
SetOutputFilter DEFLATE
重启apache
按以上步骤操作后,验证还是没有开启.



使用configtest验证后提示如下错误.
root@pchandbags:/usr/local/apache# bin/apachectl configtest
Syntax error on line 384 of /usr/local/apache/conf/httpd.conf:
Invalid command 'ddOutputFilterByType', perhaps misspelled or defined by a module not included in the server configuration

licess 发表于 2012-3-26 14:04:34

你自己写错了你都不知道吗
错误信息都已经告诉你了,自己再仔细看看吧
页: [1]
查看完整版本: 关于lnmpa gzip开启js css请教下军哥