首页 > 网站 > Apache > 正文

Apache的status相关问题解决办法

2024-08-27 18:25:35
字体:
来源:转载
供稿:网友

LNMPA中Apache的/root/lnmpa status问题解决方法

高手请无视,小白可借鉴。

问题描述:

LNMP0.7升级到LNMPA后
运行命令

/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

复制代码 代码如下:<p><span >yum install lynx -y</span><br /></p>


Step2
运行命令
复制代码 代码如下:<p><span>vi</span><span> </span><span>/</span><span>usr</span><span>/</span><span>local</span><span>/</span><span>apache</span><span>/</span><span>conf</span><span>/</span><span>extra</span><span>/</span><span>httpd</span><span>-</span><span>info</span><span>.conf</span></p>



复制代码 代码如下:<div ><span><</span><span>Location</span><span> </span><span>/</span><span>server</span><span>-</span><span>status</span><span>></span> </div><div ><span>    </span><span>SetHandler </span><span>server</span><span>-</span><span>status </span></div><div ><span>    </span><span>Order </span><span>deny</span><span>,</span><span>allow </span></div><div ><span>    </span><span>Deny </span><span>from </span><span>all </span></div><div ><span>    </span><span>Allow </span><span>from</span><span> </span><span>.example</span><span>.com</span> </div><div ><span><</span><span>/</span><span>Location</span><span>></span></div>


改成
复制代码 代码如下:<div ><span><</span><span>Location</span><span> </span><span>/</span><span>server</span><span>-</span><span>status</span><span>></span> </div><div ><span>    </span><span>SetHandler </span><span>server</span><span>-</span><span>status </span></div><div ><span>    </span><span>Order </span><span>deny</span><span>,</span><span>allow </span></div><div ><span>    </span><span>Deny </span><span>from </span><span>all </span></div><div ><span>    </span><span>Allow </span><span>from</span><span> </span><span>127.0.0.1</span> </div><div ><span><</span><span>/</span><span>Location</span><span>></span></div>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表