Server rentals :: NFOservers.com

Forums

All times are UTC - 8 hours



Author Message
PostPosted: Sat Mar 01, 2008 1:14 pm 
Offline
Former staff
Former staff
User avatar

Joined: Sun Mar 30, 2003 1:56 pm
Posts: 2252
Location: 127.0.0.1
You will need to create two files in the directory you want to protect (all subdirectories will then be protected as well): one called .htaccess, and another called .htpasswd. Because these files start with a period, you will not be able to see them in your FTP folder after you upload them, so make sure to keep a copy of both on your personal machine!

Start by opening Notepad and pasting this into the blank document:

Code:
# Access file
order allow,deny
allow from all
require valid-user
Authname "DirectoryName"
Authtype Basic
AuthUserFile /usr/www/USERNAME/DIRECTORY_TO_PROTECT/.htpasswd


USERNAME represents the username for your FTP. DIRECTORY_TO_PROTECT represents the subdirectory you are protecting with a password, and where you will be uploading .htaccess and .htpasswd to.

Save that to your hard drive under the name ".htaccess" (no quotes).

Next, open up Notepad again with a new document. For each person you want to have access to your password-protected directory, you must add the following line:

LOGIN_NAME:HASHED_PASSWORD

LOGIN_NAME represents the name they will use to login, such as "Bob". HASHED_PASSWORD is the password you want them to have, which has been run through a special filter to change it to a different form. To apply the filter, visit this page and type in the password to give them: https://www.nfoservers.com/passcreator.pl. It will output what the password hashes to; copy that string (everything after the colon on the first line, including any periods or other odd characters) into Notepad as HASHED_PASSWORD.

After you've added all the users and their passwords, save that file to your hard drive as ".htpasswd" (no quotes).

Then, simply upload .htpasswd and .htaccess into SUBDIRECTORY_TO_PROTECT on your free webspace. That directory and all subdirectories will be instantly password-protected!

_________________
-Nick


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
It is currently Sat May 25, 2013 5:22 am
Powered by phpBB® Forum Software © phpBB Group