apache server-status配置

引言

自己配置LAMP服务器时(xwamp),获取状态信息出现错误:

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

由此查找了一些资料,百度的结果都没有正解的,因此写了这篇。

以下为正文

我的环境:CENTOS 7,APACHE 2.4.27

apache配置(只允许本地服务器访问):

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

apache配置(都可以访问):

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

配置不正确可能出现的错误:

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

原文地址:https://www.cnblogs.com/osfipin/p/7192843.html