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

Re: [cobalt-users] password protecting a directory



You need two files to do this, a .htaccess file (i sets the rules) and a .htpasswd file (it contains the usernames / passwords.

The .htaccess file looks like this:

# Access File
order allow,deny
allow from all
require valid-user
Authname Secure_library
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/www.my_site_name.com/web/secure/.htpasswd

To create this, telent to the server (or use ssh if it is installed) and create a new file called .htaccess, in the directory you wish to protect.

The variables in the file are as follows:

# Access File
order allow,deny
allow from all
require valid-user
Authname <The Name of the protected Realm> (this is for display purposes only)
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /home/sites/www.rocksbackpages.com/web/<pah to .hpasswd file> (this does not have to be in the same directtory bu does need the full pah)

Next, you need to add the password file. Go to the directory to be proected and type the following:

htpasswd -c .hpasswd Marvin (or any other username)

To add additional users repeat the line above but omit the -c.

I hope this helps..

Jason.

Hello

We have just received our new cobalt RAQ4. I have very little knowledge of
Linux/Unix. I'm trying to password protect a folder but I don't know how to
create the .htaccess file. Please help.

Thanks,
Marvin


_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users