From owner-freebsd-questions Thu Mar 8 11:46:26 2001 Delivered-To: freebsd-questions@freebsd.org Received: from marlo.eagle.ca (marlo.eagle.ca [209.167.16.10]) by hub.freebsd.org (Postfix) with ESMTP id AF32237B718 for ; Thu, 8 Mar 2001 11:46:21 -0800 (PST) (envelope-from freymann@eagle.ca) Received: from phantom (phantom.eagle.ca [209.167.16.15]) by marlo.eagle.ca (8.11.0/8.11.0) with SMTP id f28Jkxv36474; Thu, 8 Mar 2001 14:46:59 -0500 (EST) (envelope-from freymann@eagle.ca) Message-ID: <00ac01c0a808$9ec72570$0f10a7d1@phantom> Reply-To: "Gerald T. Freymann" From: "Gerald T. Freymann" To: "Drew Tomlinson" Cc: References: Subject: Re: Apache Help (.htaccess) Date: Thu, 8 Mar 2001 14:47:34 -0500 Organization: eagle.ca MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 require valid-user 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" To: "FreeBSD Questions (E-mail)" 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