Nginx 作为代理不允许访问受密码保护的后端(Apache)内容

Nginx 作为代理不允许访问受密码保护的后端(Apache)内容

我使用 apache 作为后端,使用 nginx 作为前端。部分内容受 Apache (HTTP Auth) 密码保护。

当我直接访问它时 - 一切都正常,但是当我通过 nginx 尝试时 - 似乎 nginx 不会转发或缓存来自 Apache 的响应。因此在 nginx 日志中我看到:

89.21.92.0 - - [17/May/2012:22:13:42 +0200]  GET / HTTP/1.1 | upstream_address x.x.x.x:80 | upstream_status 401 | upstream_response_time 0.026 | msec 1337285622.757 | request_time 0.026
89.21.92.0 - zentavr [17/May/2012:22:13:44 +0200]  GET / HTTP/1.1 | upstream_address - | upstream_status - | upstream_response_time - | msec 1337285624.151 | request_time 0.000

在 Apache 方面:

y.y.y.y - - [17/May/2012:22:13:42 +0200] "GET / HTTP/1.0" 401 652 "-" "Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0" "89.21.92.0"

可能是什么问题?

相关内容