From owner-freebsd-questions Mon Apr 30 5:30:51 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.wmptl.com (mail2.wmptl.com [216.94.6.26]) by hub.freebsd.org (Postfix) with ESMTP id 24CC237B424 for ; Mon, 30 Apr 2001 05:30:47 -0700 (PDT) (envelope-from webmaster@wmptl.com) Received: from wmptl.com ([10.0.0.168]) by mail2.wmptl.com (8.9.3/8.9.3) with ESMTP id IAA71279; Mon, 30 Apr 2001 08:28:07 -0400 (EDT) (envelope-from webmaster@wmptl.com) Message-ID: <3AED5A8E.56914A03@wmptl.com> Date: Mon, 30 Apr 2001 08:29:02 -0400 From: Nathan Vidican X-Mailer: Mozilla 4.7 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: "Kulraj Gurm (bosa.ca account)" Cc: questions@freebsd.org Subject: Re: apache .htaccess References: <00cb01c0d0c6$c2825fc0$64c8a8c0@asknet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Kulraj Gurm (bosa.ca account)" wrote: > > I must be doing something wrong : > > Running Apache 1.3.19 on FreeBSD 4.3 > > I created a .htaccess file, inside the DocumentRoot of a web site : > > AuthType Basic > AuthName "Restricted" > AuthUserFile /var/htusr/usrlst > Require user abc123 def456 > > where abc123 and def456 are user's allowed access to a particular site. > > Then I execute htpasswd from /usr/local/apache/bin as follows : > > ./htpasswd /var/htusr/usrlst abc123 > > permissions on the files are as follows : > > -rw-r--r-- 1 root wheel 42 Apr 29 09:24 usrlst > -rw-r--r-- 1 root nobody 95 Apr 29 08:54 .htaccess > > However, when the web site is browsed there is no prompt for a username or > passwd, any ideas why? > If someone has a different way of doing this or can find fault with the > process shown above, please share your views. > > Regards, > > Kulraj Gurm > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message When doing authentication from the DocumentRoot, I find it's best to do so in the httpd.conf file for Apache, similar to this: ServerName somehost.domain ServerAdmin webmaster@somehost.domain ServerAlias www.somehost.domain DocumentRoot /server/users/some-user/public_html Options Indexes AllowOverride none AuthType basic AuthUserFile /var/htpwds/somehost.domain AuthName "Access to www.somehost.domain" require valid-user ... rest of the stuff... Nathan Vidican nathan@vidican.com / webmaster@wmptl.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message