0
我試圖做一個SSL代理使用Apache 2偵聽端口443並轉發請求基於上下文不同的IP /端口:代理升級HTTP1.1(https:// IP1:443到http:// IP2:8080)使用Apache 2
場景:
做一個JBOSS 「HTTPS的遠程處理」 請求(它使用HTTP1.1升級到 「的jboss-遠程」 在Wildfly 8.2),從:
https://xxxxxxx.com:443
並將其轉發至:
http://192.168.x.y:8080
我發現下面的RewriteCond的作品:
RewriteCond %{HTTP:Upgrade} jboss-remoting [NC]
RewriteRule ^/(.*)$ http://192.168.x.y:8080/$1 [P]
但我不能找出重寫規則,我應該爲了申請去請求HTTP的遠程處理而不是http。
阿帕奇輸入:
GET/HTTP/1.1\r\n
Sec-JbossRemoting-Key: WJaD+AcnutfrXiBna+KL5w==\r\n
Upgrade: jboss-remoting\r\n
Host: xxxxxxx.com\r\n
Connection: upgrade\r\n
阿帕奇輸出:
GET/HTTP/1.1\r\n
Host: xxxxxxx.com\r\n
Sec-JbossRemoting-Key: WJaD+AcnutfrXiBna+KL5w==\r\n
X-Forwarded-For: 192.168.x.y\r\n
X-Forwarded-Host: xxxxxxx.com\r\n
X-Forwarded-Server: xxxxxxx.com\r\n
Connection: Keep-Alive\r\n
正如你可以看到,升級和連接頭被剝離出來。 有什麼方法可以轉發一切嗎?