我有一种情况需要在重定向到外部站点之前通过内部代理服务器将请求路由到Apache,设置是这样的:
Browser Request --> Apache --> Internal Proxy Server --> External Site
没有代理服务器,我使用作为代理处理的重写([P])
完成了重定向RewriteRule ^/somepath/(.*) http://www.externalsite.com/$1 [P,QSA,L]
我发现setting up apache behind a forward proxy看起来就像我想要设置的那样,并建议我尝试以下指令:
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
,我知道代理服务器可以正常工作有什么想法吗?
答案 0 :(得分:0)
连接到代理时结束是vmware IP地址问题...上述指令似乎正确地将apache代理到代理服务器。