For lab this week, we want to set up at least two directies that require authenication for the users to access. Each of these directions must be set up to allow for a different group of users to access each directory. This can simply be done by allowing a different set of users into each directory.
Check out the following configuration file for examples on authentication
# the following is an example configuration to require Authentication of # various directories in Apache # allows all validated user from the "passwords" file <Directory "/home/pat/www/dir1"> AuthType Basic AuthName "Entry for dir1 required" AuthUserFile /etc/apache2/passwd/passwords Require valid-user Allow from all <Directory> # allows only user1 and user2 from the "passwords" file <Directory "/home/pat/www/dir2"> AuthType Basic AuthName "Entry for dir2 required" AuthUserFile /etc/apache2/passwd/passwords Require user user1 user2 Allow from all <Directory> # allow all validated users from the "password2" file <Directory "/home/pat/www/dir3"> AuthType Basic AuthName "Entry for dir3 required" AuthUserFile /etc/apache2/passwd/password2 Require valid-user Allow from all <Directory>
The command to set up the password files is
htpasswdMore information about this command can be found at: http://httpd.apache.org/docs/1.3/programs/htpasswd.html.
This lab assignment is to done in the lab in SEL 2264.