A password-protected directory protects that directory and all directories below it. To password-protect a directory(ies) in your AFS Website, log in to afs1.njit.edu - afs36.njit.edu and run the command:
/usr/ucs/bin/setup.htaccess
Alternatively, you can use the procedure below to password-protect the entire contents of a directory in your public_html directory (The directory in the example below is titled "DIR").
cd DIR
htpasswd -c .htpasswd <username>
(e.g., htpasswd -c .htpasswd cis101)
(htpasswd requests a password for cis101)
Use a text editor to create the file ".htaccess" (without the quotes), with the following lines:
<GroupName> can be any name (e.g., CIS101); it is not the same as username.
Groupname is displayed when the Password box pops up, and is used only as a name for the directory being protected.
If <GroupName> is more than one word, enclose it in double quotes ( " )
<path-to-.htpasswd> is the full path to the location of the ".htpasswd" file for this directory. If DIR is ~abc1234/public_html, then <path-to-.htpasswd> is: