Perrin Harkins wrote:
> 
> On Nov 26, 2007 4:14 PM, Neil Shephard <[EMAIL PROTECTED]> wrote:
>> So it appears to me that apache "doesn't like" the regular expression. 
>> Has
>> anyone else experienced this problem?  Is it a bug that needs reporting?
> 
> If Apache didn't like them, it would refuse to start.  You probably
> just have either a syntax problem or a conflict with another
> directive.
> 
> - Perrin
> 
> 

I suspected there might be a syntax problem in the original (stock
installation version of the 75_mod_perl.conf) and indicated what I tried as
alternatives.  According to (my understanding of) the documentation the
following should be valid...

<Location ~ "^/perl/*.pl">

but this resulted in a permission denied (see original post for what
worked).

I don't see any conflict as there is no other definition of the /perl/
directory.  For completeness the full configuration is...

<IfDefine PERL>
  <IfModule !mod_perl.c>
    LoadModule perl_module    modules/mod_perl.so
  </IfModule>
</IfDefine>

<IfModule mod_perl.c>
        #PerlTrace all
        PerlRequire "/etc/apache2/modules.d/apache2-mod_perl-startup.pl"

        #Provide two aliases to the same cgi-bin directory,
        #to see the effects of the 2 different mod_perl modes
        #for Apache2::Registry Mode
        Alias /perl/ /var/www/localhost/perl/
        #for Apache2::Perlrun Mode
        Alias /cgi-perl/ /var/www/localhost/cgi-perl/

#       <IfModule mod_access.c>
        <Location /perl-status>
                SetHandler perl-script
                PerlResponseHandler Apache2::Status
                Order deny,allow
                Deny from all
                Allow from 127.0.0.1
        </Location>
#       </IfModule>

    <Directory /home/*/public_html/perl>
        SetHandler perl-script
        PerlResponseHandler ModPerl::PerlRun
        Options -Indexes ExecCGI
                PerlOptions +ParseHeaders
    </Directory>

    PerlModule ModPerl::Registry
    #set Apache::Registry Mode for /perl Alias
    # To set subdirectories to use perl set the following 
    # and comment the orignial:
    # <Location ~ "^/perl/.*\.pl$">
    <Location  /perl/*.pl>
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        Options -Indexes ExecCGI
        PerlSendHeader On
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
    </Location>


    #set Apache::PerlRun Mode for /cgi-perl Alias
    <Location /cgi-perl/*.pl>
        SetHandler perl-script
        PerlResponseHandler ModPerl::PerlRun
        Options -Indexes ExecCGI
        PerlSendHeader On
    </Location>

# Load various modules automatically
PerlModule CGI Apache::DBI DBI DBD::mysql

</ifModule>

If there is a syntax error with the <Location ~ "/perl/*.pl"> then I'd
appreciate it if someone could explain what it is and how to correct it
(likewise with any conflicts).

Cheers

Neil
-- 
View this message in context: 
http://www.nabble.com/GATEWAY_INTERFACE-CGI-Perl-tf4849533.html#a13989945
Sent from the mod_perl - General mailing list archive at Nabble.com.

Reply via email to