Re: Overriding PerlAuthenHandler in sub-directories
[prev]
[thread]
[next]
[Date index for 2005/01/10]
I was looking into this a while back, and came across
several posts that described using a PerlAccessHandler
to determine if PerlAuthenHandler should be set or
not.
You could then setup PerlSetVar Require_Auth '0' in
any sublocations that didn't need Auth. your
AccessHandler would then do a set-handlers call and
get it to return OK for an AuthHandler (I've tried to
dig out the syntax but I can't find it)..
I tried it briefly and couldn't get it to work at all,
but I got the impression that this was down to the
really quirky setup I was trying to do it on.
Anyway not much help, but perhaps give you something
to search google on,
Marty
--- Ferrari Geoffrey
<geoffrey.ferrari@xxxxx.xxxxxx.xx.xx> wrote:
> Hi Sean,
>
> adding a .htaccess file might help, but I'm looking
> to see if there
> isn't a better solution. The main problem is that
> /foo/bar will
> actually be a virtual location, that is, it will be
> controlled by a
> <Location> directive in httpd.conf and will call the
> script to check
> the user's name and password. As such, /foo/bar will
> not actually map
> to a sub-directory on disk.
>
> Second, the question arises what exactly would go
> into the .htaccess
> file? Presumably, if a PerlAuthenHandler can be
> overridden for a
> subdirectory using a .htaccess fie, there must be
> way to override it
> directly in httpd.conf.
>
> Thanks for the suggestion, though.
>
> Geoffrey
>
>
> On 10 Jan 2005, at 13:30, Sean Davis wrote:
>
> > Does adding a .htaccess file to /foo/bar help your
> situation?
> >
> > Sean
> >
> > On Jan 10, 2005, at 7:56 AM, Ferrari Geoffrey
> wrote:
> >
> >> Hi,
> >>
> >> If I have activated a PerlAuthenHandler for a
> directory in httpd.conf
> >> with
> >>
> >> <Location /foo>
> >> ...
> >> PerlAuthenHandler My::Handler
> >> </Location>
> >>
> >> How can I deactivate this PerlAuthenHandler for a
> subdirectory, such
> >> as /foo/bar ?
> >>
> >> The online mod_perl docs explain that
> PerlHandlers can be deactivated
> >> for subdirectories by setting PerlHandler
> default-handler (when
> >> SetHandler has been set to perl-script), but
> either my problem lies
> >> elsewhere, or it is not possible to have:
> >>
> >> <Location /foo/bar>
> >> ....
> >> PerlAuthenHandler default-handler # nor
> indeed
> >> 'PerlAuthenHandler none'
> >> </Location>.
> >>
> >> All advice gratefully received. (I'm trying to
> set up authentication
> >> using Apache::AuthCookie. Since I want to avoid
> clunky URLs like
> >> www.example.com/protected/... I want to activate
> authentication for
> >> the root directory. The only problem is that the
> login form where the
> >> user types in his username and password has to be
> submitted to a
> >> location below root (e.g. /LOGIN), which of
> course, can't be done
> >> until the user has logged in...)
> >>
> >> Regards,
> >>
> >> Geoffrey Ferrari
> >
> >
>
>
___________________________________________________________
ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com