You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Frédéric Buclin <lp...@gmail.com> on 2015/03/06 23:02:01 UTC

New Apache 2.4 directives such as "Require all denied" not understood in .htaccess by mod_perl (including current 2.0.9-dev)

While investigating
https://bugzilla.mozilla.org/show_bug.cgi?id=1138463, I compiled
mod_perl 2.0.9-dev, but it still has the same problem as 2.0.8 and
older: mod_perl doesn't understand the new directives from Apache 2.4
used in .htaccess.

Apache 2.4 now uses directives such as "Require all denied" instead of
the old "Deny from all". But when mod_perl is installed, this makes
Apache 2.4 to crash with:

[core:alert] .htaccess: Require not allowed here

Maybe mod_perl is confused because "Require ..." directives are also
used for authentication.

Anyway, for now I use this hack:

    <IfVersion < 2.4>
      Deny from all
    </IfVersion>
    <IfVersion >= 2.4>
      <IfModule mod_perl.c>
        Deny from all
      </IfModule>
      <IfModule !mod_perl.c>
        Require all denied
      </IfModule>
    </IfVersion>

But this is not ideal. Known bug?