[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Offtopic: CGI and their rights
- Subject: Re: [cobalt-users] Offtopic: CGI and their rights
- From: "manitu" <manitu@xxxxxxxxxx>
- Date: Wed Feb 23 08:59:11 2000
> How do I set up a password protected DIR on the cobalt Raq2?
With .htaccess file. This is a text file that restricts the access coming
from the web to a directory. A sample .htaccess file would be:
order allow,deny
allow from all
require valid-user
Authname DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/www.domain.com/web/.htpasswd
Please note that the line "AuthPAM_Enabled off" is very important. This
.htaccess file allows only users registered in the file determined by the
"AuthUserFile" to access the files and directories in and under (!) the
directory where the .htaccess file is located.
You can also modify the file to accept groups of users. The AuthUserFile
states the file in which the valid users are stored in. Please note that
these are NOT corresponding to the linux filesystem users or groups.
You can create the .htpasswd file with the tool "htpasswd" from the shell.
Adding new users is very easy. The command line tells you the options.
If you would like, you can also setup the .htaccess file so that is does not
use a .htpasswd file (which you can name as you want, but this is the most
common name) but the linux users and groups.
You will find more information about .htaccess file at www.apache.org.
Manuel