On Sun, 13 Jul 2003 14:12:46 GMT, The Other Guy responded to a post
from "Rich ²°°³" <y5 DeleteThis @6uuyyy.co.uk> who wrote in
alt.apache.configuration:
>Hi,
>
>Here's what I've done so far..... (windows btw!)
>
>In httpd.conf I changed the .htaccess to the following (for windoze)
>
>AccessFileName folder.access
>
>So now it should look for files called folder.access, right?
I theory, yes.
>I created a password file, which I named "users.pas" and placed it in the
>directory "C:/Server/Apache Group/Apache/passwords"
>
>The users.pas contains the user "blabla".
>
>Ok, so far i think.
Have you got the prerequisite:
AllowOverride AuthConfig
<a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.0/howto/auth.html#theprerequisites" target="_blank">http://httpd.apache.org/docs-2.0/howto/auth.html#theprerequisites</a>
>I have created an alias for folder D:/installs called "/dalias/"
Has Apache got the right permissions to access D drive? In other
words, can it access it normally without the password protection? From
your comments below I assume this to be the case.
>In the D:/installs directory I created the file "folder.access" and it
>contains the following lines
>AuthType Basic
>AuthName "By Invitation Only"
>AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas
Put quotes around the above because you have a space in your file name
"Apache Group" (otherwise it thinks that it is two parameters.
e.g., "AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas"
>Require user blabla
>
>But when I browse to <a style='text-decoration: underline;' href="http://localhost/dalias/" target="_blank">http://localhost/dalias/</a> it doesn't ask for
>authorisation..
>
>Can anyone see what i've done wrong?
>
>Thanks!
>Rich.
>
It is better to put the password protection in a directory container
as opposed to an individual file like .htaccess. In other words, put
the lines in a directory container like so:
<Directory "D:/installs/dalias">
AllowOverride AuthConfig
AuthType Basic
AuthName "By Invitation Only"
AuthUserFile C:/Server/Apache Group/Apache/passwords/users.pas
Require user blabla
# plus any other Options that you desire
</Directory>
Depending on your setup, I put AllowOverride AuthConfig in the htdocs
directory container (so that all subdirectories inherit this
property), and then use AllowOverride None in subdirectories if I
want to make sure that access isn't an issue. See
<a style='text-decoration: underline;' href="http://httpd.apache.org/docs/mod/core.html#allowoverride" target="_blank">http://httpd.apache.org/docs/mod/core.html#allowoverride</a>
Check your error logs for any details as to why it may not be working.
HTH
TOG
--
../configure --prefix=~/zyterion
Not this guy or that guy, The Other Guy.
This spot may contain a satirical comment or comedic source,
and is meant to be funny. If you are easily offended, gullible
or don't have a sense of humour we suggest you read elsewhere.<!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: authorisation fails to work - really confused!