[英]arr url rewrite not working for external sites
我們正在嘗試使用ARR和URL Rewrite設置反向代理機制。 當目標URL是托管在同一服務器中的URL時,重寫工作正常。 但是當我們嘗試將其路由到外部服務器時,路由正在運行。 我們正在接受
HTTP Error 502.3 - Bad Gateway
The operation timed out
Module ApplicationRequestRouting
Notification ExecuteRequestHandler
Handler ApplicationRequestRoutingHandler
Error Code 0x80072ee2
Requested URL http://localhost:8882/ff
Physical Path D:\pocwebsites\exposed\ff
Logon Method Anonymous
Logon User Anonymous
•The CGI application did not return a valid set of HTTP errors.
•A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.
•Use DebugDiag to troubleshoot the CGI application.
•Determine if a proxy or gateway is responsible for this error.
請找到下面給出的web.config文件,
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="or_rule_1" enabled="true">
<match url=".*" />
<action type="Rewrite" url="http://www.cnn.com" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
我們遇到了類似的問題。 將URL重寫到本地站點沒有問題,但重寫到外部站點會導致錯誤的網關錯誤。
我們有一個內部代理(您也在IE中設置的代理訪問外部網站)。 在ARR反向代理頁面中設置此相同代理解決了我們的問題。
在Windows 2008上有類似的問題,IIS 7.5問題是應用程序池處於集成模式。 這導致了重寫的問題。 重定向始終沒問題,但重寫始終失敗。
我將應用程序池更改為經典模式並解決了問題(至少目前為止)。
一個更好的解決方案可能是http://forums.iis.net/t/1200671.aspx?ARR+URl+Rewrite+is+not+working+for+external+servers最后。 但我還沒試過。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.