MMv4 KB
 
Password-protect directories using Plesk
  Last Edited - 06/19/2015 12:11pm PDT
  Category Path - Shopping Cart Software Components
 
quote
How can I password protect certain directories of my website?

The method used to password protect a directory will vary from server to server. However, for clients who have their the directory they want to protect hosted with Modular Merchant, the directory can be password protected from within their Plesk control panel.

don't password protect the shopping cart's installation directory
Applying password protection to the shopping cart's installation directory will interfere with the shopping cart's functionality. The shopping cart is typically installed in the httpdocs directory, but may occasionally be installed in a subdirectory, if that was requested in the Hosting Setup Checklist.

To confirm whether your shopping cart is installed in the httpdocs directory or a subdirectory, look at the URL when viewing the Admin Home Page.

If the URL is something like www.mystore.com/ad_index.php , then the shopping cart is installed in the httpdocs directory. Don't apply password protection to the httpdocs directory.

If the URL is something like www.mystore.com/shop/ad_index.php, the shopping cart is installed in the shop subdirectory. Don't apply password protection to the httpdocs directory or to the shop subdirectory.

Apply password protection to a directory

Here's how to password protect a directory within your Modular Merchant hosting account, using the Plesk control panel:



1. Log in to your Plesk control panel.

  • The login information can be found through [Hosting > Connection Information].
  • A link to the control panel is available through [Hosting > Hosting Control Panel].

2. Within Plesk, click the Websites & Domain tab on the navigation menu.
3. Click the Show Advanced Options link to display more options.
4. Select Password-protected directories.


5. Click Add Protected Directory.
  • Enter the Directory name. If the directory doesn't already exist on your site at this location, one will be created.
  • For the Directory location, be sure that Document Root is selected.
  • The title is optional.
  • Click OK.
     

6. Click Add New User.
  • Enter a user name for the Username field.
  • Enter a password in the New password field.
  • Enter it again in the Confirm password field.
  • Click OK.
     



The directory has now been password protected, and a user has been created to access it with. When going to a file held in that directory in a web browser (Firefox, Chrome, IE, etc.), the user will be prompted to enter a user name and password.
 

tip
This will not affect FTP connections to the directory on your site; only access via web browser.

 

protecting directories not hosted with modular merchant
For website directories hosted remotely, it's recommended that they be password protected using a .htaccess file. Contact your server provider for instructions on how to set up and install a .htaccess file on their server.

Remove password protection from a directory

If you'd like to undo password protection, simply follow the steps below:

1. Log in to your Plesk control panel.

  • The login information can be found through [Hosting > Connection Information].
  • A link to the control panel is available through [Hosting > Hosting Control Panel].

2. Within Plesk, click the Websites & Domain tab on the navigation menu.
3. Click the Show Advanced Options link to display more options.
4. Select Password-protected directories.


5. In the Protected directories list, select the checkbox of the directory from which you wish to remove protection.
6. Click the Remove Protection button.
7. At the Removal Confirmation screen, select the Confirm removal checkbox, then click the OK button.

Powered by ModularKB