ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 编译安装httpd-2.4.16无法通过apachectl status 查看http服务状态

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

原创 Linux操作系统 作者:呱呱牛 时间:2016-07-08 23:14:06 0 删除 编辑
在通过源码编译安装好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博客 ” ,链接:https://blog.itpub.net/27039319/viewspace-2121752/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-05-29

  • 博文量
    96
  • 访问量
    286799