in reply to Yum install of Apache & mod_perl

First, changing index.cgi should not require a restart when using ModPerl::Registry. If it does, it's probably due to changing a module rather than index.cgi itself.

To see if your script is running under mod_perl, just print out $ENV{MOD_PERL}. If it has no value, you're running under mod_cgi instead.

At a guess, I'd say you need to reverse the order of those directives in your httpd.conf. It should go least specific to most.

Replies are listed 'Best First'.
Re^2: Yum install of Apache & mod_perl
by Rodster001 (Pilgrim) on Feb 05, 2009 at 20:41 UTC
    Printing out the environment verified that mod_perl was not running. So, I tried to see if I could get this to work:
    <Location /perl-status> SetHandler perl-script PerlResponseHandler Apache2::Status Order allow,deny Allow from all </Location>
    It did. So, after playing with the directives a little I realized the problem was actually with the rewrite rule, mod_perl wanted the location of the rewrite. So, while this did execute, it wasn't running under mod_perl:
    RewriteEngine on RewriteRule /s/ /index.cgi [NC,QSA] <Location "/path/to/site/docs/index.cgi"> SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI </Location>
    And this simple change loaded mod_perl:
    RewriteEngine on RewriteRule /s/ /index.cgi [NC,QSA] <Location "/s/"> SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI </Location>
    Obvious now... but isn't everything in hindsight?