There are two methods to password protect your web directories on the opal and ruby servers.
1. UNC Onyen authentication:
Each user home directory includes a file named ONYEN-AUTHENTICATION.txt. Follow the instructions in that file to Onyen password protect a web directory.
2. Non-Onyen passwords:
-
Log on to your opal or ruby account (via SSH).
-
Change to your public_html directory (
cd public_html
). -
Either create a new directory to password protect (
mkdir newdirectory
) or change to the one you want to protect (cd
). Choose a subdirectory of public_html; otherwise, your entire public_html will become password-protected. -
At the prompt, type
htdirpass.pl
-
When prompted, enter the user name and password that you would like your users to use.
The htdirpass.pl
script creates two files in the directory you are protecting: .htaccess and .htpasswd. You won't see these files on a regular ls command; you must type ls -a
. Don't delete the files unless you want to remove the password protection.