You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jeff Sheffield <js...@buzzard.kdi.com> on 2000/12/18 23:54:06 UTC
Unset PerlAuthenHandler (I wish)
Ok, essentially I want all but one directory on the
server to be password protected.
I want 1 directory to have the "I forgot my password"
functionality.
I am using Mason.....
and setting SetHandler default-handler has undesired results.
i.e. mason files do not get parsed.
Essentially I want to do this.
Unset PerlAuthenHandler
here is a portion of my conf file.
--------------------------------------------------
AddType text/html .mhtm
<FilesMatch ".*\.mhtm$">
SetHandler perl-script
PerlHandler HTML::Mason
</FilesMatch>
<Location /websites/foo.net/htdocs/>
AuthName "foo"
AuthType Basic
PerlAuthenHandler Apache::AuthDBI::authen
PerlAuthenHandler Apache::AuthDBI::authz
PerlSetVar Auth_DBI_data_source
dbi:mysql:database=foo_external_site;host=localhost;port=3306
PerlSetVar Auth_DBI_username jsheffie
PerlSetVar Auth_DBI_password fooo
# DBI->connect($data_source, $username, $password)
PerlSetVar Auth_DBI_pwd_table users
PerlSetVar Auth_DBI_uid_field user_id
PerlSetVar Auth_DBI_pwd_field password
PerlSetVar Auth_DBI_grp_field groups
#SELECT pwd_field FROM pwd_table WHERE uid_field=$user
require valid-user
ErrorDocument 401
/websites/foo.net/htdocs/passwd_forgoten/
</Location>
<Location /websites/foo.net/htdocs/passwd_forgoten/>
SetHandler default-handler
</Location>
-----------------------------------------
Any ideas..??
Thanks,
Jeff
-------------------------------------------
| 7.6.2.1. Configuring /etc/diphosts |
| |
| (taken from the Linux Networking-HOWTO) |
-------------------------------------------
| Jeff Sheffield |
| jeff@jspot.org |
| AIM=JeffShef |
-------------------------------------------
Re: Unset PerlAuthenHandler (I wish)
Posted by darren chamberlain <da...@boston.com>.
Jeff Sheffield (jsheffie@buzzard.kdi.com) said something to this effect on 12/18/2000:
> here is a portion of my conf file.
> --------------------------------------------------
> <Location /websites/foo.net/htdocs/>
>
> AuthName "foo"
> AuthType Basic
*snip*
Are you sure you want a <Location> here? This looks like it should be a
<Directory> section...
(darren)
--
The major difference between a thing that might go wrong and a thing that
cannot possibly go wrong is that when a thing that cannot possibly go wrong
goes wrong it usually turns out to be impossible to get at or repair.
-- Douglas Adams, 'Mostly Harmless'
Re: Unset PerlAuthenHandler (I wish)
Posted by Jim Winstead <ji...@trainedmonkey.com>.
On Dec 18, Jeff Sheffield wrote:
> Ok, essentially I want all but one directory on the
> server to be password protected.
> I want 1 directory to have the "I forgot my password"
> functionality.
>
> I am using Mason.....
> and setting SetHandler default-handler has undesired results.
> i.e. mason files do not get parsed.
> Essentially I want to do this.
> Unset PerlAuthenHandler
well, not really, because that would still fail, since you "require
valid-user".
you can do it with this:
<Location /websites/foo.net/htdocs/passwd_forgoten/>
order allow,deny
allow from all
satisfy any
</Location>
check the apache docs (http://httpd.apache.org/docs/) for
more on 'require' and 'satisfy'.
jim
RE: Unset PerlAuthenHandler (I wish)
Posted by Christian Gilmore <cg...@tivoli.com>.
Jeff,
The directory you want unprotected should be as follows:
<Location /unprotected>
PerlAuthHandler Apache::OK
PerlAuthzHandler Apache::OK
</Location>
Regards,
Christian
> -----Original Message-----
> From: Jeff Sheffield [mailto:jsheffie@buzzard.kdi.com]
> Sent: Monday, December 18, 2000 4:54 PM
> To: modperl@apache.org
> Subject: Unset PerlAuthenHandler (I wish)
>
>
> Ok, essentially I want all but one directory on the
> server to be password protected.
> I want 1 directory to have the "I forgot my password"
> functionality.
>
> I am using Mason.....
> and setting SetHandler default-handler has undesired results.
> i.e. mason files do not get parsed.
> Essentially I want to do this.
> Unset PerlAuthenHandler
>
> here is a portion of my conf file.
> --------------------------------------------------
> AddType text/html .mhtm
> <FilesMatch ".*\.mhtm$">
> SetHandler perl-script
> PerlHandler HTML::Mason
> </FilesMatch>
>
> <Location /websites/foo.net/htdocs/>
>
> AuthName "foo"
> AuthType Basic
>
> PerlAuthenHandler Apache::AuthDBI::authen
> PerlAuthenHandler Apache::AuthDBI::authz
>
> PerlSetVar Auth_DBI_data_source
> dbi:mysql:database=foo_external_site;host=localhost;port=3306
> PerlSetVar Auth_DBI_username jsheffie
> PerlSetVar Auth_DBI_password fooo
> # DBI->connect($data_source, $username, $password)
>
> PerlSetVar Auth_DBI_pwd_table users
> PerlSetVar Auth_DBI_uid_field user_id
> PerlSetVar Auth_DBI_pwd_field password
> PerlSetVar Auth_DBI_grp_field groups
> #SELECT pwd_field FROM pwd_table WHERE uid_field=$user
>
> require valid-user
>
> ErrorDocument 401
> /websites/foo.net/htdocs/passwd_forgoten/
> </Location>
>
> <Location /websites/foo.net/htdocs/passwd_forgoten/>
> SetHandler default-handler
> </Location>
> -----------------------------------------
> Any ideas..??
>
> Thanks,
> Jeff
>
> -------------------------------------------
> | 7.6.2.1. Configuring /etc/diphosts |
> | |
> | (taken from the Linux Networking-HOWTO) |
> -------------------------------------------
> | Jeff Sheffield |
> | jeff@jspot.org |
> | AIM=JeffShef |
> -------------------------------------------
>