在通过源码编译安装好apache服务,配置好chkconfig,通过
service apache2.4 status无法显示服务状态
需要修改http.conf的两处内容:1、取消
LoadModule注释 2、增加server-status
重启服务器后,显示如下信息:
点击(此处)折叠或打开
- [root@mhxy162 bin]# service apache2.4 restart
- [root@mhxy162 bin]# service apache2.4 status
- Forbidden
- You don't have permission to access /server-status on this server.
- [root@mhxy162 bin]#
点击(此处)折叠或打开
- [root@mhxy162 bin]# vi /usr/local/apache2.4/conf/httpd.conf
- 1、取消LoadModule注释
- LoadModule status_module modules/mod_status.so
-
- --2、增加server-status
- SetHandler server-status
- Order deny,allow
- Deny from all
- Allow from localhost
点击(此处)折叠或打开
- [root@mhxy162 bin]# service apache2.4 restart
- [root@mhxy162 bin]# service apache2.4 status
- Apache Server Status for localhost (via ::1)
- Server Version: Apache/2.4.16 (Unix)
- Server MPM: event
- Server Built: Jul 9 2016 06:47:40
- --------------------------------------------------------------------------
- Current Time: Saturday, 09-Jul-2016 07:08:54 CST
- Restart Time: Saturday, 09-Jul-2016 07:08:52 CST
- Parent Server Config. Generation: 8
- Parent Server MPM Generation: 7
- Server uptime: 1 second
- Server load: 0.00 0.00 0.02
- Total accesses: 0 - Total Traffic: 0 kB
- CPU Usage: u0 s0 cu0 cs0
- 0 requests/sec - 0 B/second -
- 1 requests currently being processed, 74 idle workers
- +---------------------------------------------------------------------------+
| | 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_____________
___________.....................................................
................................................................
................................................................
................................................................
................................................................
................ - 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
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27039319/viewspace-2121752/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27039319/viewspace-2121752/