Redirect 使用SSL卸载非标准本地端口重写IIS HTTP/S
好吧,所以我走到了死胡同。以下是我的设想:Redirect 使用SSL卸载非标准本地端口重写IIS HTTP/S,redirect,iis,url-rewriting,iis-8,arr,Redirect,Iis,Url Rewriting,Iis 8,Arr,好吧,所以我走到了死胡同。以下是我的设想: IIS在80和443上运行站点-external.foo.com和 一个单独的web服务正在同一节点上的端口801上运行应用程序-“web app3” 我在IIS中为external.foo.com/app3创建了一个站点。我需要所有到http://external.foo.com/app3的流量通过SSL卸载路由到本地端口801-因此从客户端到IIS的连接是SSL,但IIS到本地服务的连接是通过端口801的http 这是我在IIS中对foo/ap
- IIS在80和443上运行站点-external.foo.com和
- 一个单独的web服务正在同一节点上的端口801上运行应用程序-“web app3”
<rewrite>
<rules>
<rule name="HTTP and HTTPS to local Port 801 w/ offloading" enabled="true" stopProcessing="true">
<match url="(.*)" ignoreCase="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
</conditions>
<action type="Redirect" url="https://external.foo.com:801/{R:0}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
老实说,我认为我的问题在于必须在请求中指定端口801,但我对这一领域不太熟悉,无法对此做出正确的解释。在我的两个测试中,我看到了端口80或443都被指定了,而这两个端口都无法访问app3
我还尝试了服务器场/负载平衡路由和规则,但老实说,这让我更加困惑。。。在某一点上,我可以让我的所有其他网站重定向并加载app3,但不是app3!这条规则如下:
<rewrite>
<globalRules>
<clear />
<rule name="ARR_App3Proxy_loadbalance" enabled="true" patternSyntax="ExactMatch" stopProcessing="true">
<match url="*external.foo.com/app3" />
<action type="Rewrite" url="http://App3Proxy/{R:0}" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
</rule>
</globalRules>
</rewrite>
我是个新手-请帮忙
更新:
好的,我现在已经通过HTTPS将所有站点重定向到app3,并且似乎使用ARR卸载工作正常。全局规则如下
<proxy enabled="true" />
<rewrite>
<globalRules>
<clear />
<rule name="ARR_App3Proxy_loadbalance" enabled="true" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<action type="Rewrite" url="http://App3Proxy/{R:0}" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
</rule>
</globalRules>
</rewrite>
现在我只需要专门针对external.foo.com/app3,这样我的其他IIS站点将被排除在外。。。我现在正在进行研究和测试,但任何帮助都将不胜感激。添加一个条件以检查主机标题,并在
匹配中修改url
,以只检查app3的url。@LexLi谢谢,我无法让它工作,但我肯定我做得不对。能给我看一下或解释一下更详细的情况吗?