Apache Basic Auth 在客户网络中不起作用

Apache Basic Auth 在客户网络中不起作用

我遇到了麻烦,无法让客户看到用简单的 Apache Basic Auth 密码文件锁定的站点。

它可以在 Mac、Windows 和我们网络的所有浏览器上使用。即使客户在家里也可以使用它,但在办公室却不行。

这里可能出现什么问题?代理缓存了什么东西?

更新:我的配置在 .htaccess 或 vhost 配置中一直有效

AuthType Basic
AuthName "Customer - Project"
AuthUserFile /mnt/drbd0/www/staging.hostname.com/site/include/passwords
Require user staging.project

UPDATE2:以下是 error.log 中的相关部分

[Tue Mar 12 11:15:54 2013] [error] [client ] user  not found: /
[Tue Mar 12 11:16:15 2013] [error] [client ] user  not found: /
[Tue Mar 12 11:16:39 2013] [error] [client ] user  not found: /
[Tue Mar 12 11:17:03 2013] [error] [client ] user  not found: /
[Tue Mar 12 11:30:00 2013] [error] [client ] user staging.project: authentication failure for "/": Password Mismatch
[Tue Mar 12 11:30:17 2013] [error] [client ] user staging.project: authentication failure for "/": Password Mismatch
[Tue Mar 12 11:35:25 2013] [error] [client ] user  not found: /
[Tue Mar 12 12:34:25 2013] [error] [client ] user  not found: /
[Tue Mar 12 12:34:43 2013] [error] [client ] user download not found: /
[Tue Mar 12 13:05:08 2013] [error] [client ] user download not found: /
[Tue Mar 12 13:05:44 2013] [error] [client ] user  not found: /
[Tue Mar 12 13:05:54 2013] [error] [client ] user download not found: /
[Tue Mar 12 13:06:03 2013] [error] [client ] user download not found: /
[Tue Mar 12 17:10:29 2013] [error] [client ] user  not found: /
[Wed Mar 13 08:54:21 2013] [error] [client ] user  not found: /
[Wed Mar 13 08:54:36 2013] [error] [client ] user  not found: /
[Wed Mar 13 08:54:50 2013] [error] [client ] user  not found: /
[Wed Mar 13 08:54:52 2013] [error] [client ] user  not found: /
[Wed Mar 13 08:55:06 2013] [error] [client ] user  not found: /

答案1

授权需要用户的浏览器告诉服务器它请求的域名。看来您的客户的浏览器没有正确发送该信息。确保客户没有使用代理。当客户尝试访问网站不受保护的部分时,请观察访问日志。

还可以考虑暂时取消密码验证(如果有必要,可以在同一目录中放置一个虚拟 html 页面),看看客户是否可以在没有验证的情况下访问该页面。

相关内容