Loading...
Help

Encrypting a directory or domain


On our hosting it is possible to block access to the entire domain or only to one directory. To do this, you need to FTP the following files to the folder you want to password protect:

A file named .htpasswd which you place in the folder you want to password protect. At http://www.htaccesstools.com/…d-generator/, enter your login and password and a code will be generated for you to place in the .htpasswd file. For example, it might look like this:

jirka:$apr1$rTRApZMr$g43BgEB/8h2/IW9azU5bs0

Next, create a file called .htaccess that contains the following text:

AuthUserFile /data/www/20057/my_endpoint/www/.htpasswd
AuthName "Authorization requested"
AuthType Basic
Require valid-user
Order deny,allow

On the first line you need to edit the absolute path to the .htpasswd file. You can find it in Administration → My Domains → select domain. Only add to this path the directory you want to password and where your file is located.

That's all. Now when you try to access the domain or subdirectory where you placed the files, the browser will ask you for a login and password.

© 2001-2024 Blueboard.cz s. r. o.