2. Setup

Go to the directory containing the web pages that you want to protect. In that directory ()for the sake of example, we will use /home/zeil/secure_html/cs333) create a file named .htaccess (the leading '.' makes this a "hidden" file in Unix). The file should contain

AuthName "CS 361 (log in with your Unix account name and password)"
AuthType Basic
AuthUserFile /home/zeil/secure_html/cs333/.htpasswd
AuthGroupFile /home/zeil/secure_html/cs333/.htgroup
require group instructors

ErrorDocument 401 /~zeil/401ErrorHandling/error401.html

Of course, you should change the AuthName string to be appropriate for your course. Change the paths in the AuthUserFile and AuthGroupFile lines to point to the same directory where you are putting the new .htaccess file. Leave the ErrorDocument line as is.

In that same directory, create a file named ".htgroup" with the content:

instructors: zeil dkaneko

listing the login names for the instructors and TAs (and anyone else to whom you wish to give access but who is not a registered student.)

Both files should be given Unix permissions 664.