Thomas McLaughlin wrote:

> from my httpd.config:
> DocumentRoot "/home/httpd/html"
> <VirtualHost intranet>
>     ServerName intranet
>     DocumentRoot /home/httpd/html/intranet         
> ........
> 
> I have just set up a test dir as below:
> /home/httpd/html/intranet/DOCS/protected
> with the .htaccess file under this as follows:
> 
> cat .htaccess
> AuthType Basic
> AuthUserFile /usr/local/apache/conf/htpasswdfile
> AuthName "special directory"
> require valid-user
> #require user tamm
> #require user paul
> 
> ======================
> 
> I have also tried this with "require user tamm "
> I have created the user names/pw also but can't see
> this as the problem as I am not being asked for 
> authentication yet.
> 
>

Hi Tam,

I've only glanced at your config, so I can't tell exactly what's wrong.
I can however give you some tips for attacking the problem.From 
experience ;-)

First. Are you remembering to restart apache after each change to 
httpd.conf. (OK, I had to ask).

Second. Mozilla and netscape both cache passwords, so sometimes it 
authenticates you if you have previously logged in.
To save constantly restarting the browser, what I do is put a file like 
this in the directory.

<html>
<body>
<p>Hello, <!--#echo var="REMOTE_USER"-->.</p>
</body>
</html>

name it something.shtml

and enable processing with


<directory /home/httpd/html/intranet/DOCS/protected>
+Includes
AddHandler server-parsed .shtml
</directory>

This should be in the <VirtualHost intranet></VirtualHost> construct
otherwise it will apply to jupiter.

Now if you view this file it will say either Hello (Bad) or Hello tamm.

I would also suggest for the moment that you put all the Auth stuff

AuthType Basic
AuthUserFile /usr/local/apache/conf/htpasswdfile
AuthName "special directory"
require valid-user

in the <directory> bit above, restart httpd, and test it then.

That will allow you to see if the problem is with AllowOverride, or with 
authentification.

BTW Once you get the authentification fixed, and get 
intranet://DOCS/protected/ safe from prying eyes, try
jupiter://intranet/DOCS/protected.

Now weep.

It brings tears to my eyes anyway :-)

HTH

Lawrence

--------------------------------------------------------------------
http://www.lug.org.uk                   http://www.linuxportal.co.uk
http://www.linuxjob.co.uk               http://www.linuxshop.co.uk
--------------------------------------------------------------------

Reply via email to