I have a project which is protected by std AuthUserFile-directive in .htaccess.
Everything is quite simple and has already been fine on another server. Here is the content of my .htaccess
:
The .htaccess
:
AuthName "Adminbereich"
AuthType Basic
AuthUserFile /srv/www/passwords/.htpasswd-office
<Files *.php>
require valid-user
</Files>
The .htpasswd-office
gets accessed. If I call http://user:pass@host/
I get in. If I just call http://host/
I get this message immediately ...
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
... without any login-box showing. What could be the cause of this?
This is a example-header from here: http://www.pagetutor.com/keeper/mystash/secretstuff.html
HTTP/1.1 401 Authorization Required
Date: Thu, 01 Nov 2012 21:38:27 GMT
Server: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4
WWW-Authenticate: Basic realm="My Secret Area"
Accept-Ranges: bytes
Content-Length: 343
Content-Type: text/html
And this is my header:
HTTP/1.1 401 Authorization Required
Date: Thu, 01 Nov 2012 21:36:41 GMT
Server: Apache/2.2.20 (Ubuntu)
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
The magic WWW-Authenticate: Basic realm="..."
is missing and I have no idea why...
I use the standard ubuntu (11.10) apache (2.2.20) without any modifications...