0

我有一种情况,在重定向到外部站点之前,我需要通过内部代理服务器将请求路由到 Apache,设置是这样的:

Browser Request --> Apache --> Internal Proxy Server --> External Site

在没有代理服务器的情况下,我使用作为代理处理的重写完成了重定向( [P] )

RewriteRule ^/somepath/(.*) http://www.externalsite.com/$1 [P,QSA,L]

我发现在转发代理后面设置 apache,这看起来像是我想要设置的,并建议我尝试以下指令:

ProxyPass /somepath/ http://www.externalsite.com/
ProxyPassReverse /somepath/ http://www.externalsite.com/
ProxyRemote  http://www.externalsite.com/ http://internal.proxy.ip.addy:8080

当我设置它时,我得到了 503 和以下 Apache 日志条目:

[Thu Apr 11 07:47:14 2013] [debug] mod_proxy_http.c(1973): proxy: HTTP: serving URL http://www.externalsite.com/somefile.html
[Thu Apr 11 07:47:14 2013] [debug] proxy_util.c(2011): proxy: HTTP: has acquired connection for (www.externalsite.com)
[Thu Apr 11 07:47:14 2013] [debug] proxy_util.c(2067): proxy: connecting http://www.externalsite.com/somefile.html to www.externalsite.com:80
[Thu Apr 11 07:47:14 2013] [debug] proxy_util.c(2193): proxy: connected http://www.externalsite.com/somefile.html to internal.proxy.ip.addy:8080
[Thu Apr 11 07:47:14 2013] [debug] proxy_util.c(2444): proxy: HTTP: fam 2 socket created to connect to www.externalsite.com
[Thu Apr 11 07:47:35 2013] [error] (OS 10060)A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.  : proxy: HTTP: attempt to connect to internal.proxy.ip.addy:8080 (www.externalsite.com) failed

代理服务器日志中没有记录任何内容,如果我在浏览器中明确设置并加载该 externalsite.com,我知道代理服务器可以工作

有什么想法吗?

4

1 回答 1

0

连接到代理时最终成为 vmware IP 地址问题...上述指令似乎确实将 apache 正确代理到代理服务器。

于 2013-04-11T12:43:08.477 回答