httpd2.4不能查看状态

httpd无法apachectl status 直接查看状态,虽然没有大的影响。

但是让人十分不悦。解决方法如下。

1,先加查模块是否存在

[root@jingwangweilai ~]# apachectl -M |grep status
status_module (shared)

2,存在就忽略这一步,不存在去/etc/httpd/httpd.conf把这个模块注释掉去掉

LoadModule status_module modules/mod_status.so

3,添加如下字段

<Location /server-status>
SetHandler server-status
Require host localhost
</Location>