Date: Mon, 30 Apr 2001 08:29:02 -0400 From: Nathan Vidican <webmaster@wmptl.com> To: "Kulraj Gurm (bosa.ca account)" <kulraj@bosa.ca> Cc: questions@freebsd.org Subject: Re: apache .htaccess Message-ID: <3AED5A8E.56914A03@wmptl.com> References: <00cb01c0d0c6$c2825fc0$64c8a8c0@asknet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"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: <VirtualHost some.ip.addy> ServerName somehost.domain ServerAdmin webmaster@somehost.domain ServerAlias www.somehost.domain DocumentRoot /server/users/some-user/public_html <Directory "/server/users/some-user/public_html"> Options Indexes AllowOverride none AuthType basic AuthUserFile /var/htpwds/somehost.domain AuthName "Access to www.somehost.domain" <LIMIT PUT GET POST> require valid-user </LIMIT> </Directory> ... rest of the stuff... </VirtualHost> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3AED5A8E.56914A03>