[thelist] Apache mod_auth

Daniel J. Cody djc at starkmedia.com
Wed Jun 6 17:27:25 CDT 2001

Hola - 

Sure thing. Create an htpasswd file for each realm. .htpasswd1 and
.htpasswd2 Add your users into which ever realm they belong. Lets say
you have Joe, Susy, Mark in .htpasswd1 and Bob, Nick, Sally in

Now, in your httpd.conf file put something like this:

<Directory /foo>
AuthName "Foo"
AuthType Basic
AuthUserFile /bar/.userpasswd
AuthGroupFile /bar/.grppasswd
AllowOverride None
order allow,deny
allow from all

Create a file called /bar/.grppasswd with something like

then in /bar/public_html(examples, all of course) your .htaccess file
would look something like this:
DirectoryIndex index.html
require group realm2 combinedrealm
order deny,allow
deny from all
satisfy any

Then all you have to do is edit the users you want in the combinedrealm
group on the /bar/.grppasswd file. In this case, everyone from realm2
will get in, and only joe who is from realm one.

There are probably some errors here and its overly complex.. sorry about
that, in a hurry. :)

Lemme know if that works for ya, or if you want something different 


Jakob Dölling wrote:
> Morn' gang:
> I am going to set to restricted realms on my client's site: Realm A is for
> testing and only procteted against robots and Realm B is the protected area
> for his foreign sales agents. Is it possible merging the dummie-User from
> Realm A into the authentication files of Realm B?

More information about the thelist mailing list