IIS7中的虚拟目录上的反向代理

我正在运行一个WHS 2011并尝试通过IIS7代理一个内部networking服务器(亚音速)。 目标是:

https:// external_host / subsonic – > http:// internal_host:4040

到目前为止我所做的是:

  • 在默认网站中创build一个虚拟目录“亚音速”
  • 项目清单

创build了重写规则

无论何时我调用urlhttps:// external_host / subsonic,当尝试访问https://external_host/login.view时,我会得到一个404。 login.view实际上是内部Web服务器的login页面。

这是虚拟目录“subsonic”上的configuration:

<rewrite> <rules> <rule name="ReverseProxyInboundRule1" stopProcessing="true"> <match url="(.*)" /> <action type="Rewrite" url="http://homeserver:4040/{R:1}" /> </rule> </rules> <outboundRules> <rule name="ReverseProxyOutboundRule1" preCondition="ResponseIsHtml1"> <match filterByTags="A, Form, Img" pattern="^http(s)?://homeserver:4040/(.*)" /> <action type="Rewrite" value="http{R:1}://www.external.com/{R:2}" /> </rule> </outboundRules> </rewrite> 

是否有可能在虚拟目录上运行反向代理

IIS应用程序请求路由(ARR)是完美的解决scheme。 我们今天正在这样做,将一个面向公众的领域代理到一个内部托pipe的networking农场。 基本上它使用重写规则来实现这一点,但它也为反向代理提供了一些额外的好处。