【发布时间】:2020-04-28 01:43:24
【问题描述】:
blog 很好地解释了如何将 IIS 中的域或子域指向 Node.js 项目。 在这种情况下,它需要有两个子域,每个子域都指向一个 Node.js 项目 (localhost:port) 在示例中适用于一个项目,但不适用于两个项目。
所以在这种情况下它需要 subdomain1 指向 localhost:80 和 subdomain2 指向 localhost:82 例如。
在模式中有 (.*) 但这将匹配任何我的子域将指向同一个 Node.js 项目。 因此,尝试使反向代理模式与 here 和 printscrean 中的子域匹配,并尝试在 this post in iis forum 中作为 @PascalN 答案:
RequestedURL: Matches the pattern
Using: Wildcard
Pattern: http://www.iisserver.mycompany.com/internal1/*
In the Action section you should have something like this
Action Type: Rewrite
Rewrite URL: http://internal1.mycompany.com/{R:0}
And finally you can add another rule for your internal2 server
但仍然无法正常工作,甚至没有在内部重定向/指向该端口。
【问题讨论】:
标签: node.js iis reverse-proxy iis-10