Re: Password Protected Site

by "Carol Parent" <parent(at)djam.com>

 Date:  Sat, 12 Aug 2000 09:42:50 -0500
 To:  <hwg-basics(at)hwg.org>
 References:  hotmail rr
  todo: View Thread, Original
Morning,

I just went thru this.  It really is quite neat.  Here are some resources
that may help. (which by the way came from the members of this list)

http://www.barrysclipart.com/ht.html
http://www-7.cc.columbia.edu/cu/help/htpasswd.html
http://www.njh.com/latest/9609/960925-06.html
http://webdevelop.com/help/howto_htaccess.html
http://www.mnsinc.com/techpage/login.htm
http://www.flash.net/howto/pwprotect.html
http://www.smart.net/references/how-to/htpasswd.html
http://www.awtrey.com/support/webhost/access.php3


1) Using a text editor such as Notepad in your local PC, create a file
called ".htaccess". Note that there is a period in front of htaccess. The
file should contain following lines:

---COPY EVERYTHING BELOW--------------------
     AuthUserFile /home/cbwdesign/.htpasswd
   AuthGroupFile /dev/null
   AuthName ByPassword
   AuthType Basic
   <Limit GET POST>
   require user Spock
   </Limit>
---COPY UP TO THE LINE ABOVE---------------

2) Save the file in plain text.

3) Upload the file via FTP to /www/domain.com/member/ Make sure you are
uploading it in ASCII (plain text) mode.

4) Log onto your account on our server via Telnet.

5) Type following line at the command prompt and hit return:

     htpasswd -c /home/I_put_my_username_here/.htpasswd Spock

This will create a file named .htpasswd in your home directory.

6) you will be prompted to type in the password for Spock.

7) Let's say you want to add another user called Kirk.

8) Type folling line at the command prompt and hit return:

     htpasswd /home/foobar/.htpasswd Kirk

9) You would then add "require user Kirk" to your .htaccess. It would look
like this:

---COPY EVERYTHING BELOW--------------------
    AuthUserFile /home/I_put_my_username_here/.htpasswd
   AuthGroupFile /dev/null
   AuthName ByPassword
   AuthType Basic
   <Limit GET POST>
   require user Spock
   require user Kirk
   </Limit>
---COPY UP TO THE LINE ABOVE---------------
10) That's it. Test it by visiting http://domain/member You will be prompted
to enter username and password.

Adding additional users/passwords

1) Again telnet to your account.

2) Type following line at the command prompt and hit return:

     htpasswd /home/cbwdesign/.htpasswd Sulu

IMPORTANT: DON'T forget to add "require user Sulu" to your .htaccess file.

3) You may reuse existing user/password combinations that you created in
your .htpasswd file to allow access other password protected directories --
just use the right user name in the .htaccess file.

IMPORTANT: You should store the .htpasswd file in your home directory so it
is hidden from others
-----------------------------

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA