# How To Protect Parts of Your Web Space

Each user's home area on apollo has a subdirectory named web-docs. In this directory, you place your html files and then you have a home page. You can create subdirectories and links in web-docs.

If you place a .htaccess file with right contents (see below) in any of these directories, any pages or files in that directory will be password protected. That is, when somebody tries to browse any pages in this directory, he/she will be asked for a login name and password.

Let's say you are user johndoe.
With your favorite text editor, create a file named .htaccess (notice the dot in front of htaccess) with the following contents:

AuthType basicAuthName "Test Access"AuthUserFile /home/johndoe/.htpasswdrequire valid-user

You need to replace every occurence of "johndoe" with your helios login name and replace "Test Access" with whatever is appropriate for you. Then create a .htpasswd file in your apollo home area (i.e. /home/johndoe/) with the following shell command:

user@apollo$htpasswd -c /home/johndoe/.htpasswd user0 where .htpasswd is the password file name and johndoe is the login name for your protected pages. Once the .htpasswd is created, you can add more user and password by issuing the following commands in your shell: user@apollo$ htpasswd /home/johndoe/.htpasswd user1user@apollo$htpasswd /home/johndoe/.htpasswd user2user@apollo$ htpasswd /home/johndoe/.htpasswd user3
...

The .htpasswd file doesn't need to be in your home directory but must be consistent with what you have specified in .htaccess file.

Web Resources