Da Rock wrote:
...

    <Location /<VHOST>>
        SetHandler modperl
        PerlResponseHandler Mod_home::Mod

These 2 lines above should be enough.
Again as I thought. But if I may ask (for later configuration), how is access controlled? Using auth or access in the perl module rather than server acl's?


What I was showing off (granted, not entirely on-topic), with PerlAuthHandler and PerlAuthzHandler and friends, is one *essential* capability of mod_perl, which is often missed/ignored (at least by beginners) : the fact that mod_perl allows one to intervene with appropriate mod_perl modules and call-backs, at just about every stage of Apache's HTTP request processing (and even outside of that).

That includes the Access-control, Authentication and Authorization stages.
So you can entirely substitute Apache httpd's AAA code by your own mod_perl code, and design any AAA mechanism you wish, easily (as compared to writing your own Apache add-on modules in C e.g.). (Or interleave your own code with Apache httpd's, in just about any way you can imagine). So if you want or need for example to create a new HTTP authentication method which depends on the phase of the Moon (instead of HTTP Basic or Digest or Windows Domain or LDAP or database-based or server-ACL based), you can do so, very easily.

Mod_perl is much more than running perl cgi-bin scripts on steroids, or writing your own response handlers. It allows you to take Apache httpd as a base (and all the general HTTP plumbing it handles for you reliably and fast), add mod_perl and perl, and add the CPAN library, and you get an incredibly powerful and flexible mix.

That's the real beauty of it, which to my knowledge is not available with any other Apache plugged-in language or module.

So please, do not get discouraged by a little bit of configuration trouble, or by an occasional not entirely accurate error log message, because you would be missing a lot of power and fun.

Also, the on-line mod_perl documentation (with warts and all), is still in my view one of the best sources in terms of understanding how Apache httpd works, and even about HTTP in general.

Reply via email to