Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
4Activity
0 of .
Results for:
No results containing your search query
P. 1
Password Protection

Password Protection

Ratings: (0)|Views: 359|Likes:
Published by Triet

More info:

Published by: Triet on Dec 05, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/24/2012

pdf

text

original

 
Password-Protecting Your Site
 NOTE:
The following section is excerpted from the
ServInt Webhosting User Manual
. Please see the manual for the full version of this and many other articles covering essential topics for webmasters.Security on the Internet is a big concern, and one of the issues most important to you, as webmasters, is the ability torestrict access to portions of your web content. Luckily, it’s very easy to add password-protection and other access con-trol features to your site.
.htaccess
is a program that is restricts access to certain areas of your site by requiring a loginname and password to be used for entrance to those areas. .htaccess is the most common form of user verification usedon the Internet. D.C. FreeNet includes a basic .htaccess script that is placed in the directory of your choice. The .htaccessscript depends on a file called .
htpasswd
, where the allowed users have their login name and password stored. The pass- word is stored encrypted and cannot be identified by looking at this file. When a person tries to gain access to a site with the .htaccess script, you’ll see a dialog box pop up, asking for a
LoginName
and
Password
. The server will then verify this login name and password by checking it against the .
htpasswd
file. If the user’s input matches the .
htpasswd
information, access is granted. If not, an HTML page stating
Access IDRestricted
appears. This then puts the user back to the original page and asks for the Login Name and Password again. Access is not permitted until a valid Login Name and Password are entered.
Password-Secured Areas
The most common use for .htaccess is to protect directories from unauthorized access. To set up a protected area on yoursite you will need three files: .
htpasswd
, .
htaccess
, and
addpw
.The .
htpasswd
file is a file that will store you users names and passwords.The .
htaccess
file is a file that operates the protection script. This file looks like this:
AuthName AuthType BasicAuthUserFile /usr/home/yourusername/.htpasswd<Limit GET>order deny,allowdeny from noneallow from all</Limit>
The
addpw
file is the file you will use to add thenames and passwords to the .
htpasswd
file.These three files need to be placed into yourdirectory. If you do not know how to installthese files, please E-mail D.C. FreeNet TechSupport (
help@dcfree.net
), and we will behappy to set up your account with the files.Once you have the files, you will need to placethe .
htaccess
file in the directory that you would like to password-protect. This will pro-tect any files within that directory. If there aresub-directories in the directory with the .
htac- cess
file, then those directories will be pass- word protected as well. You can easily modify the .
htaccess
file with atext editor to match the protection you want to
D.C.FreeNet ServInt Internet Servicespage 1

Activity (4)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Genability liked this
devgujar liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->