Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Mar 2001 14:47:34 -0500
From:      "Gerald T. Freymann" <freymann@eagle.ca>
To:        "Drew Tomlinson" <drewt@writeme.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Apache Help (.htaccess)
Message-ID:  <00ac01c0a808$9ec72570$0f10a7d1@phantom>
References:  <BA5D0CE1CBB2D411B6AA00A0CC3F02390AF8BF@ldcmsx01.lc.ca.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
Here are some instructions on how to password protect a web site, always
work for me with Apache.

You must create a file in the directory you want to protect called
".htaccess" and in it should be:

AuthUserFile /usr/home/yourname/public_html/.htpasswd
AuthGroupFile /usr/home/yourname/public_html/.htgroup
AuthName Your Site's Title
AuthType basic
<Limit GET>
require valid-user
</Limit>

Now, you have to telnet into the server

Go to the directory you are protecting and type:

/usr/bin/htpasswd -c .htpasswd UserName

This will create a new file (so you do this command the very first
time you add somebody to your password file) and in that file will be
a username of "UserName" (case sensitive too)

If you wanted to grant access to a person called "Ted" then you would
use the command line:

/usr/bin/htpasswd -c .htpasswd Ted

(assuming this was the first entry)

The next time you want to add another user, go back to the directory
you are protecting and type:

/usr/bin/htpasswd .htpasswd Another_name

To change somebody's password, it's basically the same. If you wanted
to change the password for Ted, who was previously entered, again, go
back to the directory you are protecting and type:

/usr/bin/htpasswd .htpasswd Ted

That's it!

This assumes htpasswd has been copied to /usr/bin. If not, try a "locate
htpasswd"

You may have to rebuild your locate database as well.. try
/usr/libexec/locate.updatedb

-Gerry

----- Original Message -----
From: "Drew Tomlinson" <drewt@writeme.com>
To: "FreeBSD Questions (E-mail)" <freebsd-questions@FreeBSD.ORG>
Sent: Thursday, March 08, 2001 2:17 PM
Subject: Apache Help (.htaccess)


I followed the directions at http://kb.indiana.edu/data/abeq.html?cust=2008
to password protect one of my web directories using a .htaccess and
corresponding password file but it is not working.  Does anyone have any
ideas on what I may have overlooked?  What can I post or where can I look
to
help diagnose this problem.

Thanks,

Drew


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00ac01c0a808$9ec72570$0f10a7d1>