|
|
|
|
FAQ: Account features
-
How do I setup a protected directory?
With Lowcountry Hosting CPanel Control Panel setting up password protected directories is really easy. Login to your control panel and select "Password Protect Directories" follow the instructions provided.
Alternate method;
Note: setting up a password protected directory using this method requires knowledge of your account's shell (bash) and Telnet. Since Lowcountry
Basic accounts have no shell access, you must use the above option.
First, we need to create the username and password to be used to login to the protected directory. On your account's
shell, go to the directory you wish to protect, and enter the following command:
htpasswd -c .htpasswd USERNAME
Replace USERNAME with the username you wish people to use to login to the directory. Once you press the ENTER key,
htpasswd will ask for the password, and will then proceed to encrypt it. A file called .htpasswd will be created on that directory.
Note: files with a dot as the first character of a filename are "hidden". A "ls" command alone will not list them. Only "ls -a" will show
such hidden files.
Then, create a file called .htaccess on the directory you wish to protect. This file should contain the following text:
AuthType Basic
AuthName NAME OF SITE
AuthUserfile /PATH TO DIR TO PROTECT/.htpasswd
<Limit GET>
require valid-user
</Limit>
Replace NAME OF SITE with your site's domain (yoursite.com), and /PATH TO DIR TO PROTECT/ with the path of the
.htpasswd file (example: /home/users/y/yoursite.com/public_html/etc/etc/etc)
Note: you can get the path by using the command 'pwd'.
Yes... the CPanel option is better!
|
|
|
|
|
|