Prompted for authentication even when I don't want to...

Giganews Newsgroups
Subject: Prompted for authentication even when I don't want to...
Posted by:  none (invalid…@(none))
Date: Wed, 23 Sep 2009

Hi.

I have a directory which requires authentication, but local access
should be authorized without authentication.

I tried this:

<Directory "/var/www/sites/media.example.com/htdocs/foo">
    AuthType Basic
    AuthName media.example.com
    AuthUserFile /etc/apache2/sites.d/media_example_com.htpasswd
    Order allow,deny
    Allow from example.com 127.0.0.1
    Require valid-user
    Satisfy any
</Directory>

In my opinion, access is granted when the client belongs to the domain
example.com or is localhost.
In other cases only is a valid user required.

However, I'm still prompted for authentication, even when performing a
request on the machine itself:

$ wget -O - "http://media.example.com/foo/bar.php"
--17:13:59--  http://media.example.com/foo/bar.php
            => `-'
R�solution de media.example.com... XX.XX.XX.XX
Connexion vers media.example.com|XX.XX.XX.XX|:80... connect�.
requ�te HTTP transmise, en attente de la r�ponse... 401 Authorization
Required

Any hint? Thanks!

Replies