Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 199183 - www-apache/mod_perl incorrect default configuration
Summary: www-apache/mod_perl incorrect default configuration
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-14 21:27 UTC by Todd Wasson
Modified: 2008-01-06 21:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Todd Wasson 2007-11-14 21:27:44 UTC
On about line 40 of 75_mod_perl.conf, the tag '<Location  "^/perl/*.pl>' is incorrect and should be '<Location  /perl/*.pl>'.  ^ is interpreted literally in this context (as opposed to meaning beginning of string) and hence causes this pattern never to match.

Additionally, the default Aliases point to /var/www/localhost/perl/ which is neither created by the ebuild, nor is a Directory tag set up for it.  Hence, even if the user manually creates the directory, the default configuration still won't work.  There should be something added like:

<Directory "/var/www/localhost/perl">
        AllowOverride All
        Options None
        Order allow,deny
        Allow from all
</Directory>

Reproducible: Always

Steps to Reproduce:
1. emerge mod_perl
Actual Results:  
Scripts in /var/www/localhost/perl will not be executed by ModPerl::PerlRun but will be executed by ModPerl::Registry.  While this initially appears to be a ModPerl::PerlRun problem, it is in fact due to a malformed Location tag.

Expected Results:  
Scripts should have been executed by both ModPerl::PerlRun and ModPerl::Registry..

The Actual Results and Expected Results I've given above assume the user has manually created a Directory tag for /var/www/localhost/perl as given above.
Comment 1 Neil 2007-11-28 16:34:50 UTC
(In reply to comment #0)

I've also been struggling with this and have been pointed to the "What to use When" section of the Apache documentation (see http://httpd.apache.org/docs/2.2/sections.html).

My reading of this is that because its files with the extension .pl located in the /perl/ directory (i.e. /perl/*.pl) that are being referred to then using the <Location> contained is inappropriate here and as advised "Therefore you should always use the filesystem containers when you can."

(Disclaimer - I'm relatively new to all this apache/mod_perl configuration stuff so I could be way of the mark)

Comment 2 Vieri 2007-12-20 11:15:43 UTC
(In reply to comment #0)
> On about line 40 of 75_mod_perl.conf, the tag '<Location  "^/perl/*.pl>' is
> incorrect and should be '<Location  /perl/*.pl>'.

Thank you for pointing that out.

Or one could just change the mod file to this:

    <Location  /perl/*.pl>
        SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        Options -Indexes ExecCGI
        PerlSendHeader On
        Order allow,deny
        Allow from all
    </Location>

    <Location /cgi-perl/*.pl>
        SetHandler perl-script
        PerlResponseHandler ModPerl::PerlRun
        Options -Indexes ExecCGI
        PerlSendHeader On
        Order allow,deny
        Allow from all
    </Location>

At least it's working for me now.
Comment 3 Benedikt Böhm (RETIRED) gentoo-dev 2008-01-06 21:03:24 UTC
fixed, thanks