[NTLUG:Discuss] Apache and .htpasswd

Merlin merlin at tacni.net
Tue Aug 12 12:47:41 CDT 2003


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."





More information about the Discuss mailing list