7

我有以下设置

框 A(192.168.8.180 - 运行 apache 反向代理)

Box B(192.168.8.100:808 - 连接到互联网的代理服务器)

由于内部原因,box A 的 IP 被重定向到http://xyz.mydomain.com/。反向代理使用 Box B 中运行的代理连接到互联网。

当代理不需要任何身份验证时,设置工作正常。但是当 Box B 的代理需要身份验证时,我对反向代理的所有请求都失败并出现以下错误。

<h1>Unauthorized ...</h1>
<h2>IP Address: 192.168.8.180:1799<br>
MAC Address: <br>
Server Time: 2011-09-21 20:32:16<br>
Auth Result: </h2>

这是我的apache配置

<VirtualHost *:80>
    ServerName xyz.mydomain.com
    ProxyRequests Off
    ProxyPreserveHost Off
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyRemote * http://192.168.8.100:808/
    ProxyPass / http://xyz.mydomain.com/
    ProxyPassReverse / http://xyz.mydomain.com/
    RequestHeader set Authorization "Basic cGFuZGlhbjpwYW5kaWFu"


    <Location />
        Order allow,deny
        Allow from all
    </Location>

    ErrorLog "logs/myerror.log"
    CustomLog "logs/myaccess.log" common

</VirtualHost>

有任何想法吗?

访问日志说以下

127.0.0.1 - - [21/Sep/2011:20:24:55 +0530] "GET / HTTP/1.1" 407 142
127.0.0.1 - - [21/Sep/2011:20:24:57 +0530] "GET / HTTP/1.1" 407 142
192.168.8.180 - - [21/Sep/2011:20:25:33 +0530] "GET / HTTP/1.1" 407 142
192.168.8.227 - - [21/Sep/2011:20:32:07 +0530] "GET / HTTP/1.1" 407 142
192.168.8.180 - - [21/Sep/2011:20:32:14 +0530] "GET / HTTP/1.1" 407 142
192.168.8.180 - - [21/Sep/2011:20:32:15 +0530] "GET / HTTP/1.1" 407 142
192.168.8.227 - - [21/Sep/2011:20:33:58 +0530] "GET / HTTP/1.1" 407 142
192.168.8.227 - - [21/Sep/2011:20:35:03 +0530] "GET / HTTP/1.1" 407 142
192.168.8.227 - - [21/Sep/2011:20:35:16 +0530] "GET / HTTP/1.1" 407 142
192.168.8.227 - - [21/Sep/2011:20:35:24 +0530] "GET / HTTP/1.1" 407 142

代理凭据是正确的。用浏览器验证。

谢谢

4

0 回答 0