VPS侦探论坛

 找回密码
 注册
查看: 36375|回复: 14

LNMPA中Apache的status问题解决方法

[复制链接]
发表于 2011-5-4 14:38:12 | 显示全部楼层 |阅读模式

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

问题描述:

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
  1. yum install lynx -y
复制代码
Step2
运行命令
  1. vi /usr/local/apache/conf/extra/httpd-info.conf
复制代码
  1. <Location /server-status>
  2.     SetHandler server-status
  3.     Order deny,allow
  4.     Deny from all
  5.     Allow from .example.com
  6. </Location>
复制代码
改成
  1. <Location /server-status>
  2.     SetHandler server-status
  3.     Order deny,allow
  4.     Deny from all
  5.     Allow from 127.0.0.1
  6. </Location>
复制代码
重启Apache
  1. service httpd restart
复制代码
再用/root/lnmpa status或者service httpd status查看Apache状态就是正常的了
还可以用http://youripordomain/server-status访问通过Web查看


知识拓展:
请自行Google"apache server-status"

[ 本帖最后由 纯属偶然 于 2011-5-4 14:41 编辑 ]

评分

参与人数 1威望 +6 收起 理由
licess + 6

查看全部评分

美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-5-4 14:53:30 | 显示全部楼层


非常感谢,已经修正。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-7-16 23:35:20 | 显示全部楼层

谢谢,学习了。很有帮助
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-11-28 10:06:05 | 显示全部楼层





ubuntu 执行了一下apt-get install lynx

不知道对不对
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-11-28 10:12:17 | 显示全部楼层


完了,估计是错了,我瞎弄好几次让系统挂了

下载了一堆不知道是什么的东西,现在还没安装完

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-11-28 10:14:42 | 显示全部楼层



搜了一下,这个命令好象是安装一个lynx的浏览器,跟apache报错没一毛钱的关系吧?
发表于 2011-11-28 10:25:54 | 显示全部楼层

  装完了,无效。貌似确实不是一回事。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
头像被屏蔽
发表于 2011-12-12 04:57:19 | 显示全部楼层

那我把
/etc/init.d/httpd: line 112: lynx: command not found
这个注释掉不可以吗??

反正也没啥用..注释掉..浪费资源.
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-12-12 08:00:43 | 显示全部楼层

可以
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-12-12 11:51:28 | 显示全部楼层

Red Hat 下安装失败





求助啊!还发不了主题贴

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2011-12-13 02:00:08 | 显示全部楼层

[root@12_13 ~]# /root/lnmpa status
=========================================================================
Manager for LNMPA V0.7  ,  Written by Licess
=========================================================================
LNMPA is a tool to auto-compile & install Nginx+MySQL+PHP+Apache on Linux
This script is a tool to Manage status of LNMPA
For more information please visit http://www.lnmp.org

Usage: /root/lnmpa {start|stop|reload|restart|kill|status}
=========================================================================
Nginx is runing!

                      Apache Server Status for localhost

   Server Version: Apache/2.2.17 (Unix) mod_ssl/2.2.17
          OpenSSL/0.9.8e-fips-rhel5 PHP/5.2.17

   Server Built: Nov 14 2011 11:30:47
     _________________________________________________________________

   Current Time: Tuesday, 13-Dec-2011 14:03:29 CST
   Restart Time: Saturday, 03-Dec-2011 23:58:35 CST
   Parent Server Generation: 0
   Server uptime: 9 days 14 hours 4 minutes 54 seconds
   1 requests currently being processed, 9 idle workers

_._.__............._.................W_....._........._.........
...._...........................................................
................................................................
................................................................

   Scoreboard Key:
   "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
   "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
   "C" Closing connection, "L" Logging, "G" Gracefully finishing,
   "I" Idle cleanup of worker, "." Open slot with no current process
SUCCESS! MySQL running (13999)



这是什么情况?

[ 本帖最后由 snsqq 于 2011-12-13 14:07 编辑 ]
发表于 2012-7-8 18:55:48 | 显示全部楼层

回复 9# 的帖子


军哥啊,Error 403  Access forbidden! 出现后,直接用step2的方法,但里面的代码如何修改啊,我是在putty里使用命令,但改不了啊,另外替换的127.0.0.1 这个IP是自己网站的IP还是就是楼主说的这个IP啊?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2013-12-8 13:37:50 | 显示全部楼层

回复 11# 的帖子

我也是这样,同病相怜啊
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-4-16 20:16:43 | 显示全部楼层
按照此方法修改后发现  server   httpd status  Not Found     The requested URL /server-status was not found on this server.
然后到处找问题 最终发现是  /usr/local/apache/conf/httpd.conf 中本来应该include conf/extra/httpd-info.conf 的  结果脚本可能写错了   这一行被注释掉
所以把这一行前面的#号去掉就能正确的include了  /root/lnmpa/status 就可以正确显示了

军哥运维代购:http://shop63846532.taobao.com/

发表于 2015-4-27 23:44:51 | 显示全部楼层

回复 14# 的帖子

跟你一样的结果,然后按你的修改后还是不行

[root@cloud ~]# /etc/init.d/httpd status
                       Apache Server Status for localhost

   Server Version: Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips
          PHP/5.3.28

   Server Built: Apr 27 2015 22:14:01
     __________________________________________________________________

   Current Time: Monday, 27-Apr-2015 23:44:20 CST
   Restart Time: Monday, 27-Apr-2015 23:43:54 CST
   Parent Server Generation: 0
   Server uptime: 25 seconds
   1 requests currently being processed, 4 idle workers

W____...........................................................
................................................................
................................................................
................................................................

   Scoreboard Key:
   "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
   "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
   "C" Closing connection, "L" Logging, "G" Gracefully finishing,
   "I" Idle cleanup of worker, "." Open slot with no current process
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-4-30 09:59 , Processed in 0.032058 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表