You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "M.v.Buytene" <ma...@regex.nl> on 2004/09/01 10:57:30 UTC
Using Apache Directives
I am trying (as a starting test) to replace some apache directives by
mod_perl's syntax, so i can hopefully easily yank in specific perl
functions.
Running apache 2.0.50
Mod_perl 1.99
On a debian sarge machine.
All compiled by hand and no errors during compilation/installation.
included in httpd.conf :
LoadModule perl_module modules/mod_perl.so
PerlModule Apache2
Then i made a vhost according to the example's on perl.apache.org and
included also a snippet of
simple authentication that is there.
<Perl>
use Apache2 ();
use Apache::PerlSections ();
$VirtualHost{"0.0.0.0"} = {
ServerName => 'test01',
DAVLockDB => '/tmp/lock.db',
Documentroot => '/usr/local/apache-dav/htdocs/DAVTEST',
$Directory{"/usr/local/apache-dav/htdocs/DAVTEST"} = {
AuthUserFile => '/tmp/htpasswd',
AuthType => 'Basic',
AuthName => 'test',
DirectoryIndex => [qw(index.html index.htm)],
AllowOverride => 'None',
Limit => {
METHODS => 'GET POST',
require => 'valid-user',
Order => 'allow,deny',
Allow => 'from all',
},
},
};
print Apache::PerlSections->dump;
</Perl>
If i use these directives 'plain' apache style they work flawless, i
must supply a password when browsing to the directory or when i mount
the webdav.
When used with mod_perl i can enter the directory without
authentication, and the same goes for webdav, no authentiction needed.
Tho the vhost i created works like a charm.
What am i doing wrong?
Thanx in advance.
Martijn van Buytene
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Using Apache Directives
Posted by "M.v.Buytene" <ma...@regex.nl>.
On 2004-09-04 19:58:21 +0200, Stas Bekman <st...@stason.org> said:
The proper solution is :
Limit => {
'GET PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK
UNLOCK' => {
require => 'valid-user',
Order => 'allow,deny',
Allow => 'from all',
},
So it's not really a bug, more lack of documentation :)
Thanks to Rici Lake for handing this out to me...
-----
> M.v.Buytene wrote:
>> I am trying (as a starting test) to replace some apache directives by
>> mod_perl's syntax, so i can hopefully easily yank in specific perl
>> functions.
>>
>> Running apache 2.0.50
>> Mod_perl 1.99
>
> That's not enough information, Martijn. When reporting problems make
> sure to file a proper problem report: http://perl.apache.org/bugs/
>
>
>> Limit => {
>> METHODS => 'GET POST',
>> require => 'valid-user',
>> Order => 'allow,deny',
>> Allow => 'from all',
>> },
>> },
>> };
>
>> When used with mod_perl i can enter the directory without
>> authentication, and the same goes for webdav, no authentiction needed.
>> Tho the vhost i created works like a charm.
>>
>> What am i doing wrong?
>
> Not sure why it doesn't work. Philippe? Tests?
>
> but if you read:
> http://httpd.apache.org/docs-2.0/en/mod/core.html#limit
> it says:
>
> Access controls are normally effective for all access methods,
> and this is the usual desired behavior. In the general case,
> access control directives should not be placed within a <Limit> section.
>
> so try to drop the Limit block, till Philippe shows up.
>
> --
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html
Re: Using Apache Directives
Posted by Stas Bekman <st...@stason.org>.
M.v.Buytene wrote:
> I am trying (as a starting test) to replace some apache directives by
> mod_perl's syntax, so i can hopefully easily yank in specific perl
> functions.
>
> Running apache 2.0.50
> Mod_perl 1.99
That's not enough information, Martijn. When reporting problems make sure
to file a proper problem report: http://perl.apache.org/bugs/
> Limit => {
> METHODS => 'GET POST',
> require => 'valid-user',
> Order => 'allow,deny',
> Allow => 'from all',
> },
> },
> };
> When used with mod_perl i can enter the directory without
> authentication, and the same goes for webdav, no authentiction needed.
> Tho the vhost i created works like a charm.
>
> What am i doing wrong?
Not sure why it doesn't work. Philippe? Tests?
but if you read:
http://httpd.apache.org/docs-2.0/en/mod/core.html#limit
it says:
Access controls are normally effective for all access methods,
and this is the usual desired behavior. In the general case,
access control directives should not be placed within a <Limit> section.
so try to drop the Limit block, till Philippe shows up.
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html