Quote:
|
Originally Posted by XILO-Matt Hi,
You will need to create a username and password login.
Via the control panel, it can be created via the ".htaccess generator".
Matt |
Here is a basic manual solution using ftp (no need for CP).
For each directory you want to protect, add a file called ".htaccess" with the following contents (don't forget the dot):
Code:
AuthType basic
AuthName "Secure Area"
AuthUserFile /hsphere/local/home/<your account name>/.htmaster/.trusted
Require valid-user
Make .htaccess read only (perms 444 --r--r--r). It's best to create these files and then ftp them over, checking the permissions afterward.
From the path above you can deduce that you need a directory called .htmaster in the root folder of your account (one level above the domain name directory). Make this directory with perms 705 rwx---r-x.
Now, all you need is the .trusted file, this will contain one line per user, such:
Code:
username1:hash1
username2:hash2
You should also give this perms of 444 --r--r--r (read only).
You decide on the user names, and passwords. there are two options to output the lines above, either you can g0.0gle for "htpassword generator" and use the likes of:
http://www.mreriksson.net/online/htgenerator/
or use the following unix command
Code:
> htpasswd -n usernameN
HTH.