Site Panel Help | User Panel Help | Panel Demo's | Search | Help |
Categories· New Customer FAQs · FAQ Home |
XML-File<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?> <!-- XML-Output by phpMyFAQ 1.3.8 --> <phpmyfaq xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:NamespaceSchemaLocation="http://www.phpmyfaq.de/xml/faqschema.xsd"> <article id="91"> <language>en</language> <category>Password Protection</category> <keywords></keywords> <theme>ADVANCED: Handmade Password Protection</theme> <content xmlns="http://www.w3.org/TR/REC-html40">This FAQ describes how you can add the files that are required to password protect a folder. It is simpler to just add password protection from the site owner panel (as described in the other article on Password Protection) - but if you need more advanced control option you can use the information in this article. Password protection is a 2 step proces. 1: Create a file with the usernames and passwords 2: Upload a ".htaccess" file to protected folder(s) ----------------------------------------------------------------------------- 1): Create the file file that will hold the usernames and passwords: ----------------------------------------------------------------------------- 1.1) Login with SSH to the server 1.2) Goto your home folder ("cd /home/admin" or "cd /home/username") 1.3) Type this command to create a new password file with the first user: ------------------------------ htpasswd -c .htpasswd george (replace "george" with a username you like) ------------------------------ You will now be asked to enter the password for the username you specified. 1.3a): Optional: Add more users to the password file The "-c" used above creates the new password file. To add more users, do the same, but without the "-c" part. For example: ------------------------------ htpasswd .htpasswd joe htpasswd .htpasswd bill ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- 2): Protect the folder(s): ----------------------------------------------------------------------------- 2.1) Create a plain text file with any plain text editor you like. The file should look like this: ------------------------------ AuthUserFile /home/virtual/example.com/home/admin/.htpasswd AuthName "Restricted Area" AuthType Basic Require valid-user ------------------------------ Note: - Replace "example.com" with your real domain name. - Make sure "/home/admin/.htpasswd" points to the file you created under 1). Save the file as "htaccess.txt". 2.2) Upload the file to the folder you want to protect. 2.3) Rename the file to ".htaccess". (Note the dot as first character) ----------------------------------------------------------------------------- That's it. You can read about advanced options for the Apache web server <a href="http://httpd.apache.org/docs/2.0/howto/auth.html" target="_blank">here</a>.</content> <author>EchoEcho Support</author> <date>12.07.2009, 21:18</date> </article> </phpmyfaq> |
Copyright © EchoEchoPlus Hosting |