撤消或覆盖 Apache“Require”指令

发布时间:2021-03-06 12:39

假设在我们的核心 Apache 2.4 配置中,我们有

<Directory "/">
    AuthType foo
    Require bar
    AllowOverride AuthConfig Limit
</Directory>

但是... Require foo 实际上对于一个特定目录来说过于宽松了。

我们可以将 .htaccess 文件添加到子目录,但不能比 Require foo 限制,因为它已经被应用了。

有没有办法取消应用它?要让 .htaccess 文件说“请忽略之前给出的 Require 指令,让我从头开始”?

在我的特定情况下,我有 AuthType shibbolethRequire shibboleth(它仅启用 Shibboleth,而不会限制对任何特定条件的访问),因此这里可能也有特定于 Shibboleth 的答案。

回答1