[NTLUG:Discuss] Apache and .htpasswd

Richard Humphrey richard at multicam.com
Tue Aug 12 13:06:12 CDT 2003


I was wondering if something like the following would work.

AuthUserFile /var/www/.htpasswd .htpasswd2

or maybe defining this twice

AuthUserFile /var/www/.htpasswd
AuthUserFile /var/www/.htpasswd2


-----Original Message-----
From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org]On
Behalf Of Merlin
Sent: Tuesday, August 12, 2003 12:48 PM
To: discuss at ntlug.org
Subject: Re: [NTLUG:Discuss] Apache and .htpasswd



Richard Humphrey amused Merlin with these comments:
> Can Apache be configured to read from more than one .htpasswd file? We
> have several .htpasswd files and we need to authenticate users on a
> specific page from each .htpasswd file. How can we do this?

Richard,

My understanding is that this is handled on a directory by directory
basis.  You could, kludgy as it is, put each page in a separate
directory
and add a .htaccess file to each directory.  The .htaccess file
specifies
which .htpasswd file to use, the name of the realm, and the
authentication
type.

I've only done this on a limited basis, but it's not hard to set up.
The
nice thing about the .htaccess file is that it provides "local" control
for that directory and will override any server configuration settings.

http://httpd.apache.org/docs/howto/auth.html#basic

Good info here on setting up the .htaccess file and using the htpasswd
utility.


--
Merlin
"Do not meddle in the affairs of Wizards,
for they are subtle and quick to anger."



_______________________________________________
https://ntlug.org/mailman/listinfo/discuss




More information about the Discuss mailing list