需要 IP 指令 Apache Debian 的问题

Issue with Require IP directive Apache Debian

我有一个在 Apache 2.4 Debian Buster 上使用的工作配置。但是我不知道是什么导致了错误,因为系统实际上是在解释指令并拒绝基于它的访问,而不是允许访问。

<location /restricted>
     <RequireAny>
#Admin1
        Require ip 192.168.172.241
     </RequireAny>
</location>

此位置是内部节点的反向代理,因此虚拟主机配置中的唯一目录是:

<Directory /var/www/html>
    Options -Indexes +FollowSymLinks
    AllowOverride All
</Directory>

在虚拟主机错误日志中,我收到以下消息:

[authz_core:error] [pid 20896] [client 192.168.172.241:58346] AH01630: client denied by server configuration: proxy:http://[internal.ip:port]

在此先感谢您的帮助。

我发现自己遇到了有史以来最基本的问题之一。我在某些时候通过 SSH SCP 连接在 Windows 中用 Notepadd++ 中的 ACL 配置修改了文件。无论出于何种原因,它在 IP 所在的行上创建了一个 Microsoft carriage 和 EOL,使该条目的 ACL“仅”无效。吸取教训。