httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Davies <rich...@daviesmail.org>
Subject [users@httpd] Single auth file for many per-user directories
Date Wed, 23 May 2012 11:30:53 GMT
Hi all,

I would appreciate any suggetions on how to achieve the following:

I have a large number of per-user directories:

  /var/www/user1
  /var/www/user2
  /var/www/user3
  ...

And a htdigest file containing usernames and passwords for all of these
users.

I want to set up authentication for each user to access just their own
directory.

The obvious method is to have a very long Apache config file, with
"Require user1", "Require user2", etc. specified manually for each
directory.

However, I have a lot of users!

Is there some clever way around this, for example a way to do:

  Require <auth_username=root_directory_name>


Or alternatively, a way for me to have "Require valid-user", but then
somehow prevent users from accessing directories other than their own?
(even with a hack like rewrite rules?)

Thanks for any pointers,

Richard.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message