首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >设置Apache使用内部代理服务器(代理链?)

设置Apache使用内部代理服务器(代理链?)
EN

Stack Overflow用户
提问于 2013-04-11 20:14:44
回答 1查看 1.6K关注 0票数 0

在重定向到外部站点之前,我需要通过内部代理服务器将请求路由到Apache,设置如下:

代码语言:javascript
复制
Browser Request --> Apache --> Internal Proxy Server --> External Site

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

代码语言:javascript
复制
RewriteRule ^/somepath/(.*) http://www.externalsite.com/$1 [P,QSA,L]

我找到了setting up apache behind a forward proxy,它看起来是我想要设置的,并建议我尝试以下指令:

代码语言:javascript
复制
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日志条目:

代码语言:javascript
复制
[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,我就知道代理服务器可以工作

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2013-04-11 20:43:08

最终在连接到代理时出现vmware IP地址问题...上面的指令似乎可以正确地将apache代理到代理服务器。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15948523

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档