1

我有一个受 .htaccess 中的 std AuthUserFile-directive 保护的项目。

一切都很简单,在另一台服务器上已经很好了。这是我的内容.htaccess

.htaccess: _

AuthName "Adminbereich"
AuthType Basic
AuthUserFile /srv/www/passwords/.htpasswd-office

<Files *.php>
require valid-user
</Files>

.htpasswd-office访问。如果我打电话http://user:pass@host/,我会进来。如果我只是打电话http://host/,我会立即收到这条消息......

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.

...没有任何登录框显示。这可能是什么原因?

这是此处的示例标头: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

这是我的标题:

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

魔法WWW-Authenticate: Basic realm="..."不见了,我不知道为什么......

我使用标准的 ubuntu (11.10) apache (2.2.20) 没有任何修改...

4

0 回答 0