![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Restricting Access to your Web Site with Password-Protected DirectoriesPassword-protecting files and directories is used for "user authentication". The best place to learn about user authentication is from the source (NCSA). They have a very easy to understand tutorial at the following URL: You should be aware of one subtle difference with the Virtual Server System: when you set up your .htaccess files, you will specify the AuthUserFile or AuthGroupFile with respect to your home directory.When you set up your .htpasswd files, however, with the htpasswd command you will need to prepend /usr/home/[login_name] to the directory specification.
AuthGroupFile /dev/null AuthName Bill's Restaurant AuthType Basic <Limit GET> require user William </Limit> Note that the AuthUserFile implicitly assumes the "/usr/home/[login]" prefix to the path. You must explicity state this prefix when setting the htpasswd path. To set up the password for "William" issue the following command: % htpasswd -c /usr/home/[login]/etc/.htpasswd William You will then be asked for your password. You may use the htpasswd command without the -c flag to add additional users; e.g. where peanuts, almonds, and walnuts are additional users:
% htpasswd /usr/home/[login]/etc/.htpasswd almonds % htpasswd /usr/home/[login]/etc/.htpasswd walnuts
Recommended Books You can also learn about User Authentication in some of the Web Server Configuration and Web Security books we recommend. |
|