问题获取httpd fullstatus在Apache 2.4上的web服务器上工作

我有一个networking服务器,我正在迁移到RHEL7(httpd 2.2 – > 2.4)。 在我们的老服务器(2.2)中,我们可以做一个httpd fullstatus,并且会在服务器上显示很多关于apache的信息。

在Apache 2.4服务器上,我遇到了问题,使fullstatus命令工作。 这是我采取的步骤列表(从互联网上的各种指南编译) –

1) – 检查是否启用了status_module。 httpd -M | grep status httpd -M | grep status返回status_module (shared)

2.) – 将模块添加到httpd.conf –

 <IfModule mod_status.c> <Location "/server-status"> SetHandler server-status Require host <my hostname> Order deny,allow Deny from all Allow from 127.0.0.1 </Location> </IfModule> 

3.) – 在conf.modules.d /中创build一个conf文件(与上面相同的文字) –

 <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 127.0.0.1 </Location> 

我做了所有这些事情后重新加载/重新启动apache,但我仍然没有运气让httpd fullstatus工作。

注 – 我也单独做了这两个步骤,但没有运气,这就是为什么我把它们放在一起,希望它能起作用。

你们对下一步应该做什么有什么想法吗?

谢谢。

EDIt – 这是目前的输出时我试图运行httpd fullstatus –

 [username@hostname]# httpd fullstatus Usage: httpd [-D name] [-d directory] [-f file] [-C "directive"] [-c "directive"] [-k start|restart|graceful|graceful-stop|stop] [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X] 

编辑2 – 当运行apachectl fullstatus,我得到一个权限被拒绝的错误 –

  Forbidden You don't have permission to access /server-status on this server. 

fullstatus是apachectl命令的一个选项,而不是httpd。 从使用情况输出来看,这听起来像是这里的问题。 尝试

 apachectl fullstatus