编译安装httpd-2.4.16无法通过apachectl status 查看http服务状态

在通过源码编译安装好apache服务,配置好chkconfig,通过 service apache2.4 status无法显示服务状态

点击(此处)折叠或打开

  1. [root@mhxy162 bin]# service apache2.4 restart
  2. [root@mhxy162 bin]# service apache2.4 status
  3. Forbidden
  4. You don't have permission to access /server-status on this server.
  5. [root@mhxy162 bin]#
需要修改http.conf的两处内容:1、取消 LoadModule注释 2、增加server-status

点击(此处)折叠或打开

  1. [root@mhxy162 bin]# vi /usr/local/apache2.4/conf/httpd.conf
  2. 1、取消LoadModule注释
  3. LoadModule status_module modules/mod_status.so

  4. --2、增加server-status
  5. SetHandler server-status
  6. Order deny,allow
  7. Deny from all
  8. Allow from localhost
重启服务器后,显示如下信息:

点击(此处)折叠或打开

  1. [root@mhxy162 bin]# service apache2.4 restart
  2. [root@mhxy162 bin]# service apache2.4 status
  3. Apache Server Status for localhost (via ::1)
  4. Server Version: Apache/2.4.16 (Unix)
  5. Server MPM: event
  6. Server Built: Jul 9 2016 06:47:40
  7. --------------------------------------------------------------------------
  8. Current Time: Saturday, 09-Jul-2016 07:08:54 CST
  9. Restart Time: Saturday, 09-Jul-2016 07:08:52 CST
  10. Parent Server Config. Generation: 8
  11. Parent Server MPM Generation: 7
  12. Server uptime: 1 second
  13. Server load: 0.00 0.00 0.02
  14. Total accesses: 0 - Total Traffic: 0 kB
  15. CPU Usage: u0 s0 cu0 cs0
  16. 0 requests/sec - 0 B/second -
  17. 1 requests currently being processed, 74 idle workers
  18.    +---------------------------------------------------------------------------+
       |       |    Connections    |   Threads   |        Async connections        |
       |  PID  |-------------------+-------------+---------------------------------|
       |       | total | accepting | busy | idle | writing | keep-alive | closing ||
       |-------+-------+-----------+------+------+---------+------------+---------||
       |37449  |0      |yes        |0     |25    |0        |0           |0        ||
       |-------+-------+-----------+------+------+---------+------------+---------||
       |37450  |0      |yes        |0     |25    |0        |0           |0        ||
       |-------+-------+-----------+------+------+---------+------------+---------||
       |37451  |0      |yes        |1     |24    |0        |0           |0        ||
       |-------+-------+-----------+------+------+---------+------------+---------||
       |Sum    |0      |           |1     |74    |0        |0           |0        ||
       +---------------------------------------------------------------------------+


     __________________________________________________W_____________
     ___________.....................................................
     ................................................................
     ................................................................
     ................................................................
     ................................................................
     ................

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


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27039319/viewspace-2121752/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/27039319/viewspace-2121752/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值