Site Panel Help User Panel Help Panel Demo's Search Help

Categories

· Show all categories

· New Customer FAQs
· E-Mail
· FTP - File Transfers
· Domains
· SSH and Telnet
· Scripting Languages
· Password Protection
· MySQL
· Stats
· Power Tools

· FAQ Home

· EchoEcho+ Support

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 &quot;.htaccess&quot; 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 (&quot;cd /home/admin&quot; or
&quot;cd
/home/username&quot;)

1.3) Type this command to create a new password file with
the first user:
------------------------------
htpasswd -c .htpasswd george (replace &quot;george&quot;
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 &quot;-c&quot; used above creates the new password file.

To add more users, do the same, but without the
&quot;-c&quot; 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 &quot;Restricted Area&quot;
AuthType Basic
Require valid-user
------------------------------
Note: 
- Replace &quot;example.com&quot; with your real domain
name.
- Make sure &quot;/home/admin/.htpasswd&quot; points to the
file you
created under 1).
Save the file as &quot;htaccess.txt&quot;.

2.2) Upload the file to the folder you want to protect.

2.3) Rename the file to &quot;.htaccess&quot;. (Note the dot
as first
character)
-----------------------------------------------------------------------------

That&#039;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>

open XML-File

Copyright © EchoEchoPlus Hosting