簡體   English   中英

設置Apache以使用內部代理服務器(代理鏈接?)

[英]Setting up Apache to use an internal Proxy Server( Proxy Chaining? )

我遇到一種情況,我需要先通過內部代理服務器將請求路由到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,則代理服務器將正常工作

有什么想法嗎?

當連接到代理時最終成為vmware IP地址問題...上述指令似乎確實可以正確地將apache代理傳遞到代理服務器。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM