How to protect a directory with login and password?

Question: How to protect a directory with login and password with the help of Hosting Controller?

Solution:
This article guides through the steps needed to create password protected web directories.

What are password protected directories?
Password protected web directories are those which require a user login name and password when accessed from the web through a web browser. 

To create a password protected directory, follow these steps: 

  1. Login into control panel as Reseller or WebAdmin, click Domains, click List Web Sites and select website under which the password protected directory is needed.
  2. Click "Virtual Dir." button, click Add Virtual Dir. button.  Select the folder path in Physical Path box, hit Expand button and browse until you reach the folder which is needed to secure, e.g. wonders.com/www/anaconda/.
  3. Enter a directory name in Alias for Virtual Directory box, e.g. mysecret. Select No from Allow Anonymous radio box (No is selected by default) and click Add Virtual Directory button.

 The above procedure will create a virtual directory mysecret pointing to the folder wonders.com/www/anaconda/. You may then access the directory as http://wonders.com/mysecret. Because anonymous access is denied, therefore when this URL is accessed, the browser will prompt for login and password and only the user given ACL access on the physical directory will be allowed to login.

To add ACL access to the directory, follow these steps:

  1. Login as Web Admin, click Website Services :: Folders & Security :: Folder Manager :: View / Set / Remove Permissions, click ACL Permissions, select the website name in Folder box, click Select Folder button and browse until you select the folder on which permission has to be set.
  2. Click on Permissions button, select the user from Users box, select the desired permission from Permissions box, select Both (files and folder) from Inheritance box and click Add/User button.
Note: For windows, disable both "anonymous auth" and "windows auth" for virtual directory to start accepting FTP user credentials. And in case of Linux, webadmin credentials could be used to access the password protected directory.

Add Feedback