如何通过托管在 IIS 服务器上在 https 上运行节点应用程序

时间:2021-03-29 07:50:08

标签: node.js iis https hosting httpbackend

我想在 IIS 服务器上托管节点应用程序。我使用重写 URL 导航到我正在运行的节点应用程序。我的网站在 IIS 服务器上运行,这是我的 web.config 看起来像

<rewrite>
            <rules>
            <rule name="RewriteUIPage">
                    <match url="^(.*)$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="/" />
                </rule>     <rule name="NodeApiMapp" enabled="true" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{URL}" pattern="/api/*.*$" />
                    </conditions>
                    <action type="Rewrite" url="http://localhost:5025{C:0}" />
                </rule>
            </rules>
        </rewrite>

0 个答案:

没有答案