一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

LNMPA中Apache的httpd运行错误解决办法

时间:2013-07-09 编辑:简简单单 来源:一聚教程网


使用军哥的LNMPA很久了,最近突然发现这个问题,服务器运行一段时间之后自动504错误,需要重启才能解决,直接结束不了apache.

运行命令/root/lnmpa status
Apache的status一项会出现错误提示:
/etc/init.d/httpd: line 112: lynx: command not found
或者
Error 403 Access forbidden!

解决方法:
出现lynx: command not found错误提示的需要完成Step1&Step2
出现Error 403  Access forbidden!错误提示的只需要完成Step2

Step1
安装lynx


yum install lynx -y
Step2
运行命令


vi /usr/local/apache/conf/extra/httpd-info.conf


SetHandler server-status 

Order deny,allow 

Deny from all 

Allow from .example.com
改成


SetHandler server-status 

Order deny,allow 

Deny from all 

Allow from 127.0.0.1
重启Apache


service httpd restart
再用/root/lnmpa status或者service httpd status查看Apache状态就是正常的了

热门栏目