ITS | Web Services home | Web support services
Web support & webmaster services: Web technology & search engine support
Password protecting Web sites on the Medical Campus Web serverTo password protect the files in a Web directory you need to create two files in the directory you want to protect, ".htaccess" and ".htpasswd". You may only password protect an entire directory. If you would like information on how to IP protect an entire directory please see the instructions on IP Protecting Your Web Documents. InstructionsWhile in the directory you wish to protect do the following: 1. Create the .htaccess file Create a file named .htaccess (the filename must be exact, use all lower case letters and be sure to include the leading period in the file name). You can create the .htaccess file with any text editor or on your local computer. You will need to transfer the file to the directory you wish to protect on the server if you are working locally on your machine. On the info.med.yale.edu Web server you can use the "pico" editor, typing the command: pico .htaccess In all of the following examples change the all bold items to be correct for your directory information. The contents of the .htaccess file must have the following format:
2. Create the .htpasswd file To create the ".htpasswd" file, log onto info.med.yale.edu using telnet and:
After you have successfully created the first user(s) and password(s) and you later want to add another: Repeat steps 1 and 3 above to create the new users password in the ".htpasswd" file If you want to delete a user ID, delete the user's entire line in the ".htpasswd" file with any text editor. |
Getting started... |