0
我有一種情況,我需要通過內部代理服務器將請求路由到Apache之前重定向到外部網站,設置是這樣的:設置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
任何想法?