You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by James Stalker <jw...@sanger.ac.uk> on 2001/10/29 09:58:24 UTC
Problem with Directory in Perl sections
Hi,
I have hit a problem with the latest couple of versions of mod_perl, and I wondered if anyone might know a solution.
We're using Apache 1.3.22 with mod_perl 1.26, and there appears to be a problem with the <Directory> directive in perl sections...
e.g.
$Directory{$DocumentRoot}={
Options => '-Indexes FollowSymLinks',
AllowOverride => 'None',
SetHandler => 'perl-script',
PerlHandler => 'Apache::EnsEMBL::SendDecPage',
order => 'deny,allow',
allow => 'from all',
};
does not work in a <Perl> section but it works fine outside:
<Directory /mysql/ensembl/www/sanger-test/htdocs >
Options -Indexes FollowSymLinks
AllowOverride None
SetHandler perl-script
PerlHandler Apache::EnsEMBL::SendDecPage
order deny,allow
allow from all
</Directory>
/perl-status reports that the former looks as I would expect:
%Directory = (
'/mysql/ensembl/www/server/htdocs' => {
'Deny' => 'from all',
'AllowOverride' => 'None',
'Order' => 'deny,allow',
'PerlHandler' => 'Apache::EnsEMBL::SendDecPage',
'Options' => '-Indexes FollowSymLinks',
'SetHandler' => 'perl-script'
},
);
There are no errors reported, but the handler simply doesn't kick in. We have been using this config for some months now, and this worked fine in 1.21. It stopped working by at least version 1.25.
Anybody have any ideas?
Regards,
James
--
James Stalker
Senior Web Developer - Project Ensembl - http://www.ensembl.org
Re: Problem with Directory in Perl sections
Posted by "Richard L. Goerwitz III" <ri...@goerwitz.com>.
James Stalker wrote:
> Does anyone here have Directory working in Perl sections in mod_perl
> 1.25 or above?
It's funny that you mention this because, now that I think
about it, I always set up directory and location blocks inside
virtual host blocks, e.g.:
$VirtualHost{"_default_:80"} = {
ServerName => $hostname,
DirectoryIndex => 'index.html index.shtml index.epl',
etc...
Location => {
'/admin/perl-status' => {
SetHandler => 'perl-script',
PerlHandler => 'Apache::Status'
},
etc...
},
FilesMatch => {
q(.*\\.epl$) => {
SetHandler => 'perl-script',
PerlHandler => 'HTML::Embperl',
Options => '+ExecCGI'
},
etc...
},
Directory => {
directory stuff goes here
}
}
--
Richard Goerwitz richard@Goerwitz.COM
tel: 401 438 8978
Re: Problem with Directory in Perl sections
Posted by James Stalker <jw...@sanger.ac.uk>.
OK, looks like no-one has any ideas - maybe I should rephrase the question.
Does anyone here have Directory working in Perl sections in mod_perl 1.25 or above?
Thanks,
Jim
On Mon, Oct 29, 2001 at 08:58:24AM +0000, James Stalker wrote:
> Hi,
>
> I have hit a problem with the latest couple of versions of mod_perl, and I wondered if anyone might know a solution.
>
> We're using Apache 1.3.22 with mod_perl 1.26, and there appears to be a problem with the <Directory> directive in perl sections...
> e.g.
>
> $Directory{$DocumentRoot}={
> Options => '-Indexes FollowSymLinks',
> AllowOverride => 'None',
> SetHandler => 'perl-script',
> PerlHandler => 'Apache::EnsEMBL::SendDecPage',
> order => 'deny,allow',
> allow => 'from all',
> };
>
> does not work in a <Perl> section but it works fine outside:
>
> <Directory /mysql/ensembl/www/sanger-test/htdocs >
> Options -Indexes FollowSymLinks
> AllowOverride None
> SetHandler perl-script
> PerlHandler Apache::EnsEMBL::SendDecPage
> order deny,allow
> allow from all
> </Directory>
>
> /perl-status reports that the former looks as I would expect:
>
> %Directory = (
> '/mysql/ensembl/www/server/htdocs' => {
> 'Deny' => 'from all',
> 'AllowOverride' => 'None',
> 'Order' => 'deny,allow',
> 'PerlHandler' => 'Apache::EnsEMBL::SendDecPage',
> 'Options' => '-Indexes FollowSymLinks',
> 'SetHandler' => 'perl-script'
> },
> );
>
> There are no errors reported, but the handler simply doesn't kick in. We have been using this config for some months now, and this worked fine in 1.21. It stopped working by at least version 1.25.
>
> Anybody have any ideas?
>
> Regards,
>
> James
--
James Stalker
Senior Web Developer - Project Ensembl - http://www.ensembl.org