Configuring .htaccess FaQ - Creating a Password protected Folder
This will generate a pop-up login request to the person access the folder for contents. 2 files are to be created and placed in the folder of interest.
Create a file or insert into your ".htaccess" file
order allow,deny
allow from all
require valid-user
Authname DirectoryName
AuthPAM_Enabled off
Authtype Basic
AuthUserFile /location of htpasswd/.htpasswd
Then create another file called ".htpasswd". Log into SSH for this and excute this command.
/usr/bin/htpasswd -c /location of the htaccess file/.htpasswd
This will create a new .htpasswd file in that specified location.
You will then be prompted for the username and password.
To add a new user to the same file, leave out the -c in the commandline.
Back to FaQ Section
|
|