perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Schout <>
Subject Re: PATCH: add -DAPACHE24 support to Apache::Test - necessary for Auth with Apache 2.4
Date Mon, 17 Mar 2014 21:03:55 GMT
On 3/17/14, 1:58 PM, André Warnier wrote:
> Not an answer to your question, but many thanks for that module, for
> keeping it up-to-date, and for pointing out the differences in Apache 2.4.


> Incidentally, where can I find a description of the new Apache 2.4 API ?

I'm not sure there is really a place that it is documented extensively
anywhere in one place.

I figured it out from reading these pages:

as well as reading source code for the various apache modules in httpd
2.4 source (e.g.: mod_auth_basic.c, mod_authz_user.c etc) and the
mod_perl patch for apache 2.4 to figure out how the new directives have
been implemented in mod_perl.

Basically it comes down to needing to do the following for Apache 2.4:

declare your Authz handler with something like:

> PerlAddAuthzProvider user Sample::Apache2::AuthCookieHandler->authz_handler

Assuming you want to send Forbidden response if Authz fails (which is
what previous versions did):

> <Location /docs>
>   AuthzSendForbiddenOnFailure On
> </Location>

And REMOVE any PerlAuthzHandler entries you have configured (this is
what the PerlAddAuthzProvider does instead).

Also Require defaults to satisfy Any now, so if you had:

Require user foo
Require user bar

You have to wrap that in <RequireAll> now.

Feel free to look at the httpd24 branch of AuthCookie on github to see
how I implemented it.

Michael Schout

View raw message