You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jan-Aage Frydenbø-Bruvoll <ja...@frydenbo-bruvoll.com> on 2008/11/03 13:22:03 UTC

Remove Perl*Handler from subfolder

Dear list,

I've been googling unsuccessfully for quite a while to find an answer to my
problem, so I'm hoping that someone here would be able to help me... My
question and problem is quite simple - I need to remove a Perl*Handler from
a sub folder after defining it higher up in the Apache config hierarchy.

Example:

<Location />
  SetHandler perl-script
  PerlResponseHandler myreponsehandler
  PerlAccessHandler myaccesshandler
</Location>

<Location /nohandler>
  SetHandler default-handler
  # how to disable the PerlAccessHandler?
</Location>

As you can see I've found how to disable/re-set the response handler, but
the Access handler is still active. Any tips, please?

TIA + best regards
Jan

Re: Remove Perl*Handler from subfolder

Posted by Jan-Aage Frydenbø-Bruvoll <ja...@frydenbo-bruvoll.com>.
2008/11/3 André Warnier <aw...@ice-sa.com>

> Adam Prime wrote:
>
>> I believe you can do something like:
>>
>> PerlAccessHandler "sub {return Apache2::Const::DECLINED;}"
>>
>> Adam
>>
>
> You may even be able to simplify that to
>
> PerlAccessHandler Apache2::Const::DECLINED
>
> (I'm curious, does it work ?)
>
>
Yup, even prettier!

Thanks
Jan

Re: Remove Perl*Handler from subfolder

Posted by André Warnier <aw...@ice-sa.com>.
Adam Prime wrote:
> Jan-Aage Frydenbø-Bruvoll wrote:
>> Example:
>>
>> <Location />
>>   SetHandler perl-script
>>   PerlResponseHandler myreponsehandler
>>   PerlAccessHandler myaccesshandler
>> </Location>
>>
>> <Location /nohandler>
>>   SetHandler default-handler
>>   # how to disable the PerlAccessHandler?
>> </Location>
>>
>> As you can see I've found how to disable/re-set the response handler, 
>> but the Access handler is still active. Any tips, please?
>>
> 
> I believe you can do something like:
> 
> PerlAccessHandler "sub {return Apache2::Const::DECLINED;}"
> 
> Adam

You may even be able to simplify that to

PerlAccessHandler Apache2::Const::DECLINED

(I'm curious, does it work ?)


Re: Remove Perl*Handler from subfolder

Posted by Jan-Aage Frydenbø-Bruvoll <ja...@frydenbo-bruvoll.com>.
2008/11/3 Adam Prime <ad...@utoronto.ca>

> I believe you can do something like:
>
> PerlAccessHandler "sub {return Apache2::Const::DECLINED;}"
>
> Adam
>

Ha! Brilliant - works a charm. Thanks a lot!

- Jan

Re: Remove Perl*Handler from subfolder

Posted by Adam Prime <ad...@utoronto.ca>.
Jan-Aage Frydenbø-Bruvoll wrote:
> Example:
> 
> <Location />
>   SetHandler perl-script
>   PerlResponseHandler myreponsehandler
>   PerlAccessHandler myaccesshandler
> </Location>
> 
> <Location /nohandler>
>   SetHandler default-handler
>   # how to disable the PerlAccessHandler?
> </Location>
> 
> As you can see I've found how to disable/re-set the response handler, 
> but the Access handler is still active. Any tips, please?
> 

I believe you can do something like:

PerlAccessHandler "sub {return Apache2::Const::DECLINED;}"

Adam