[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Question .htaccess Raq3



Was going through Cobalt's KB saw a question about .htaccess but it was on a
Raq2, would it apply to an Raq3? If you haven't read the article it's:

How do I password protect a directory on a RaQ2 using my own password file?
Thanks

1. Telnet in, and login as the User or admin
2. Navigate to the directory you want to password protect.
3. Create the .htaccess file, it should contain the following lines:

# Access file
order allow,deny
allow from all
require valid-user
Authname DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/sitename/web/directory/.htpasswd

Replace sitename and directory as appropriate.

Note: If you want to use the systems' /etc/passwd file for authentication
you can eliminate the AuthUserFile line from the .htaccess file above.

4. Now you must create the .htpasswd file using the htpasswd tool.

a. Type the following command to create the file and add a user:

htpasswd -c .htpasswd username

b. You will be prompted for the users' password twice.

5. If you need to add additional users to the file, use the command above
without the -c.