Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SargeApache2Notes
Edit
PageHistory
Diff
Info
LikePages
!!! [Apache]2 and mod_perl The version of mod_perl for apache2 in Sarge (libapache2-mod-perl2) is 1.999.21. Only a short while after Sarge was released, mod_perl version 2.0 was released. Unfortunately, its behaviour changed in some significant ways, and the documentation on http://perl.apache.org/docs/2.0/ reflects this stable version. So if you are using Sarge and apache2 and mod_perl, you have some poorly documented features and mis-features. Wonderful. Instead, you can have hours of fun trying to figure everything out for yourself. !!mod_perl and ~DirectoryIndex <verbatim> [error] [client x.x.x.x] Attempt to serve directory: /var/www/path/to/directory/ </verbatim> This version of mod_perl for apache2 screws up ~DirectoryIndex directives, since perl gets the request for the directory before mod_dir gets a chance. I suggest using mod_rewrite or a redirect instead. See [this thread|http://www.spanner.org/lists/mod_perl/2005/04/13/710deb3f.html] for an explanation. There is a fix you can do by loading your own handler into mod_perl for handling directories - [this post|http://www.spanner.org/lists/mod_perl/2005/04/27/12c49991.html] in the above thread uses this solution. !!Apache2.pm module This version (1.999.21) of mod_perl expects you to do <verbatim> use Apache2; </verbatim> and then the old style <pre> use Apache::''module''; </pre> much the way that mod_perl for apache1 did. This changed in mod_perl 2.0, so that there is no Apache2.pm any more, and you should just do <pre> use Apache::''module''; </pre> This means that you should do <verbatim> PerlInitHandler Apache::Reload </verbatim> in your apache config file, not <verbatim> PerlInitHandler Apache2::Reload </verbatim> as stated in perl.apache.org's online documentation.
One page links to
SargeApache2Notes
:
ApacheNotes