nodejs在windows server IIS 外运行 - loufq/studynodejs GitHub Wiki
在用IISNode的时候重写规则遇到了一点麻烦,所以寻找替代的解决方案, 最终使用了 IIS做方向代理 + nodejs程序 以服务器程序方式启动 的方式, 替代方案还不够简洁,至少是达到了效果
webConfig配置
<rules>
<rule name="myrule">
<match url="^(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.test.cn$" />
</conditions>
<action type="Rewrite" url="http://localhost:port/{R:1}" />
</rule>
</rules>
</rewrite>
两篇参考文章 1.将node.js程序注册为windows服务 2.[在IIS7中应用Application Request Routing配置反向代理]http://www.cnblogs.com/leven/archive/2009/11/10/Proxy_Application_Request_Routin.html
另一种方法IISNode Installing and Running node.js applications within IIS on Windows