IIS重写到本地应用程序-404失败
我想使用IIS8将流量从端口80/443路由到运行在同一台服务器上的两个应用程序——一个位于端口8080上(node.js app,作为单独的服务运行),另一个位于端口8090上(一个.NET应用程序,运行在相同的IIS上,处理api调用) 我已在端口80上安装了一个应用程序,其web.config如下IIS重写到本地应用程序-404失败,iis,iis-8,Iis,Iis 8,我想使用IIS8将流量从端口80/443路由到运行在同一台服务器上的两个应用程序——一个位于端口8080上(node.js app,作为单独的服务运行),另一个位于端口8090上(一个.NET应用程序,运行在相同的IIS上,处理api调用) 我已在端口80上安装了一个应用程序,其web.config如下 <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rewrite api to backend calls" stopProcessing="true">
<match url="^api/(.+)$"/>
<action type="Rewrite" url="http://127.0.0.1:8080/{R:1}"/>
</rule>
<rule name="rewrite everything else to frontend" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://127.0.0.1:8090/{R:1}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
必须根据主题启用应用程序请求路由中的代理。问题已解决:)
ModuleName="IIS Web Core", Notification="MAP_REQUEST_HANDLER", HttpStatus="404", HttpReason="Not Found", HttpSubStatus="4", ErrorCode="The filename, directory name, or volume label syntax is incorrect.
(0x8007007b)", ConfigExceptionInfo=""