在重定向到外部站点之前,我需要通过内部代理服务器将请求路由到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,我就知道代理服务器可以工作
有什么想法吗?
发布于 2013-04-11 20:43:08
最终在连接到代理时出现vmware IP地址问题...上面的指令似乎可以正确地将apache代理到代理服务器。
https://stackoverflow.com/questions/15948523
复制相似问题