解决 apache error 指定网络名不再可用 "an unknown filter was not added: DEFLATE"的问题
2013-06-01 23:58
477 查看
今天突然发现网站访问不了了,到服务器上看apache还是启动状态,重启后就可以正常访问了。
查看apache的错误日志发现有很多下面的错误信息:
指定网络名不再可用
[error] an unknown filter was not added: DEFLATE
这个错误是由于虚拟主机配置文件中使用了DEFLATE,但apache却没有使用mod_deflate模块导致的。
比如虚拟主机的配置中有:
<Location />
AddOutputFilterByType DEFLATE text/html text/xml text/plain
</Location>
ok,找到原因后,就好解决了,让apache加载mod_deflate模块即可。
Apache2 推荐使用 mod_deflate 压缩,mod_gzip 适合apache1.x。
1. 查找模块 deflate
find /home/test/httpd-2.0.50 -name mod_deflate.c
2. 安装 mod_deflate
cd /home/test/httpd-2.0.50/modules/filters
/usr/local/apache2/bin/apxs -i -c -a /home/test/httpd-2.0.50/modules/filters/mod_deflate.c
apxs命令参数说明:
-i 此选项表示需要执行安装操作,以安装一个或多个动态共享对象到服务器的modules目录中。
-a 此选项自动增加一个LoadModule行到httpd.conf文件中,以激活此模块,或者,如果此行已经存在,则启用之。
-c 此选项表示需要执行编译操作。它首先会编译C源程序(.c)files为对应的目标代码文件(.o),然后连接这些目标代码和files中其余的目标代码文件(.o和.a), 以生成动态共享对象dsofile 。如果没有指定 -o 选项,则此输出文件名由files中的第一个文件名推测得到,也就是默认为mod_name.so 。
如果是新安装apache,直接加上 --enable-headers --enable-deflate 即可.
查看apache的错误日志发现有很多下面的错误信息:
指定网络名不再可用
[error] an unknown filter was not added: DEFLATE
这个错误是由于虚拟主机配置文件中使用了DEFLATE,但apache却没有使用mod_deflate模块导致的。
比如虚拟主机的配置中有:
<Location />
AddOutputFilterByType DEFLATE text/html text/xml text/plain
</Location>
ok,找到原因后,就好解决了,让apache加载mod_deflate模块即可。
Apache2 推荐使用 mod_deflate 压缩,mod_gzip 适合apache1.x。
1. 查找模块 deflate
find /home/test/httpd-2.0.50 -name mod_deflate.c
2. 安装 mod_deflate
cd /home/test/httpd-2.0.50/modules/filters
/usr/local/apache2/bin/apxs -i -c -a /home/test/httpd-2.0.50/modules/filters/mod_deflate.c
apxs命令参数说明:
-i 此选项表示需要执行安装操作,以安装一个或多个动态共享对象到服务器的modules目录中。
-a 此选项自动增加一个LoadModule行到httpd.conf文件中,以激活此模块,或者,如果此行已经存在,则启用之。
-c 此选项表示需要执行编译操作。它首先会编译C源程序(.c)files为对应的目标代码文件(.o),然后连接这些目标代码和files中其余的目标代码文件(.o和.a), 以生成动态共享对象dsofile 。如果没有指定 -o 选项,则此输出文件名由files中的第一个文件名推测得到,也就是默认为mod_name.so 。
如果是新安装apache,直接加上 --enable-headers --enable-deflate 即可.
相关文章推荐
- Apache的一个错误:[error] an unknown filter was not added: PHP
- Apache error.log [warn](OS 64)指定的网络名不再可用。winnt_accept: Asynchronous AcceptEx failed.
- apache 指定的网络名不再可用 原因及解决方法
- “指定的网络名不再可用/企图在不存在的网络连接上进行操作”的问题解决
- apache指定的网络名不再可用错误解决方法
- Apache 指定的网络名不再可用 winnt_accept: Asynchronous AcceptEx failed 的解决办法
- 关于“指定的网络名不再可用\企图在不存在的网络连接上进行操作”的问题解决
- 【问题解决】An internal error occurred during: "Computing additional info". Could not initialize class javax.crypto.JceSecurityManager
- apache2.4出现(OS 64)指定的网络名不再可用。 : AH00341: winnt_accept: Asynchronous AcceptEx failed.问题
- Xcode真机调试中"There was an internal API error"错误解决方法
- 解决编译apache出现的问题:configure: error: APR not found . Please read the documentation
- 解决编译Apache出现的问题:configure: error: APR not found . Please read the documentation
- 解决:ERROR ITMS-90023: "Missing required icon file. The bundle does not contain an app icon for iPad o
- "npm ERR! Error: EPERM: operation not permitted"问题解决
- 解决Fiddler "creation of the root certificate was not successful”的问题
- 解决Cygwin编译cocos2dx 遇到的 error: 'UINT64_C' was not declared in this scope 问题
- 关于Apache (OS 64)指定的网络名不再可用。 : AH00341: winnt_accept: Asynchronous AcceptEx failed.
- Latex error "Not enough room in an internal buffer" 解决方法
- Myeclipse server报错 Could not create the view: An unexpected exception was thrown.问题解决
- PL/SQL Developer 中的问题:Initialization error Could not load ".../oci.dll"解决方法