How to use more than one AuthUserFile per context

Apache 2.2 has a module called mod_authn_alias which can be used to query multiple authentication sources in a single context.

The scenario here is:

There are other approaches to this problem like merging the separate files together, perhaps as part of the Apache init script. Otherwise one might use AuthGroupFile and list all users from both files. These are troublesome though as in the first case the Apache init script might be overwritten during an upgrade and the second case is just tedious.

<AuthnProviderAlias file file1>
  AuthUserFile conf/file1.passwd
<AuthnProviderAlias file file2>
  AuthUserFile conf/file2.passwd

<VirtualHost *:80>
  DocumentRoot /var/www/
  <Location />
    AuthBasicProvider file1 file2
    AuthName 'Area Restricted by mod_authn_alias'
    AuthType basic
    Require valid-user

MultiUserFiles (last edited 2009-09-20 22:13:22 by localhost)