Conexim web hosting
Delivering: Managed Dedicated Hosting Excellence.
Password protected directories


Home

Bookmark this page   Add to Favorites
Add to del.icio.us Add to Digg Add to Slashdot Add to StumbleUpon Add to Dzone Add to Reddit Add to Technorati

Hosting solutions
   Dedicated server
   Server clusters
   Virtual servers (VM) Virtualisation
   Application hosting
   Co-location
   Managed Security
   Email hosting
   DNS hosting
   Streaming
   Complete product list
Web hosting
Domain names
Domain hosting
Asia-Pacific datacenter

Fax to Email
Outsourced IVR

About us
Customers
Contact us

Partner channel

Jobs


Contact phone 1300 133 900
Contact fax1300 851 747

International
US:
866 485 0297
NZ: 0800 450 236


conexim.info help



Password protected directories

Placing a password on your World Wide Web pages is a multi-part process. Most of these steps are not difficult to accomplish.

First, all files that you want to be protected by password should be in a separate subdirectory. You may want to create a directory called "protected" in your Web page storage area for the pages you want behind a password. Most FTP programs will allow you to create new subdirectories in your account area.

You probably want something like this in your directory...

    index.html
    /protected/subpage1.html
    /protected/subpage2.html
    . . .
    /protected/subpage8.html
    /protected/subpage9.html


Then, create a file called ".htaccess" in the passworded (protected) directory that contains:

    require valid-user
    AuthType Basic
    AuthName "My protected area"
    AuthUserFile .htpasswd


The file name MUST be .htaccess (yes, it starts with a period) and this file MUST be in the same directory with the files that are to be protected. (You probably do not want to put this in your primary Web area because this would result in your entire Web area being protected.)

Both files (.htaccess and .htpasswd) must be PURE TEXT or ASCII files. You CANNOT use your html editor to create these files. Most word processing programs allow you to save text as pure ascii. One of the problems seen frequently is that the program used to create the .htaccess file wants to add a ".txt" at the end of the file name. If this happens, the password protection will not work. The name must be .htaccess and nothing else.

The AuthUserFile shown above is the file containing the actual password needed for your file and it must include a full UNIX path to that location. For security reasons, the full UNIX path for your Web pages is not published here. Please contact support@conexim.com.au to obtain this information for your account.

The AuthName above contains the text people will see in the password entry box when they attempt to gain access to your page. It is best to keep this as short as possible. It is possible to place more than one word on this line by using quotation mark. For example:

    AuthName "Reseller access only"


will display the information above in the password box when users try to access the page.

The tool at the bottom of this page will help you create the text for the file storing your actual password.

In the example above, the name of the file holding the encrypted password is ".htpasswd". If you want to call the password file some other name, you will need to change the information on the AuthUserFile line in the .htaccess file.



Enter a user name:
Enter a password (to be encrypted):








© 1993-2008 Conexim Australia Pty. Limited. ABN 34 083 513 348 | AUP | spam trap

Microsoft, Red Hat, Extreme, Juniper, Supermicro, Nortel, Trend, CA