问题
As in this blog is well explained how to point a domain or subdomain in IIS to a Node.js project. In this case its needed to have two subdomains each point to a Node.js project (localhost:port) in the example works well for one project but not for two.
So in this case its needed for subdomain1 point to localhost:80 and subdomain2 point to localhost:82 for example.
In the reverse proxy have:
in the pattern had (.*) but that would match any and my subdomains would point to same Node.js project. So tried to make the reverse proxy pattern match its subdomain as in here and in the printscrean and also tried as in this post in iis forum as @PascalN answer:
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
but still not working and doesn't even redirects/point to that port internaly.
回答1:
My mistake in the configuration of both sites the phisical path was the same (same folder) what originated that the sites shared the two reverse proxys.
Assumed that with the use of reverse proxy would point to another project (Node.js) would't have any conflict sharing the same phisical folder but that was in fact my probleam, now each site points to different folders, so each site only haves one reverse proxy as expected and works.
来源:https://stackoverflow.com/questions/61326944/iis-reverse-proxy-2-subdomain-to-2-node-js