【发布时间】:2021-07-19 00:23:48
【问题描述】:
我在我的 Apache 服务器中在 httpd.conf 处实施了一个全局 IP 块,显示禁止 IP 403 错误文档,但无法访问 403 错误文档,因为禁止 IP 的访问再次被拒绝,因此他们看不到403 错误文档由 403 错误。它说403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
<Directory "${SRVROOT}/htdocs">
Options FollowSymLinks
AllowOverride None
<RequireAll>
Require all granted
Include conf/banlist.conf
</RequireAll>
ErrorDocument 403 "/error403.php"
</Directory>
<Location />
<RequireAll>
Require all granted
Include conf/banlist.conf
</RequireAll>
ErrorDocument 403 "/error403.php"
</Location>
这是我在httpd.conf 中的访问控制代码。我应该在哪里处理它以允许被禁止的 IP 访问 403 文档而不禁用全局 IP 块?
【问题讨论】: