Node.js 为什么';t Nodejs应用程序在Windows IIS上工作
我将nodejs应用程序与要在windows IIS上托管的express一起使用。在我的IIS8中nodej起作用了。但是我得到了一个错误'Cannot GET/node/server.js',我将重写规则放在web.config中。然后我得到了以下错误 HTTP错误500.19-内部服务器错误 无法访问请求的页面,因为该页面的相关配置数据无效 我在网上发现的。每个人都建议使用以下配置,但在我的windows上不起作用 我的web.config文件是:Node.js 为什么';t Nodejs应用程序在Windows IIS上工作,node.js,iisnode,Node.js,Iisnode,我将nodejs应用程序与要在windows IIS上托管的express一起使用。在我的IIS8中nodej起作用了。但是我得到了一个错误'Cannot GET/node/server.js',我将重写规则放在web.config中。然后我得到了以下错误 HTTP错误500.19-内部服务器错误 无法访问请求的页面,因为该页面的相关配置数据无效 我在网上发现的。每个人都建议使用以下配置,但在我的windows上不起作用 我的web.config文件是: <configuration>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="server.js" verb="*" modules="iisnode" />
</handlers>
<defaultDocument>
<files>
<add value="server.js" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^[a-zA-Z0-9_\-]+\.js\.logs\/\d+\.txt$"/>
</rule>
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^server.js\/debug[\/]?" />
</rule>
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}"/>
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
</conditions>
<action type="Rewrite" url="server.js"/>
</rule>
</rules>
</rewrite>
<iisnode nodeProcessCountPerApplication="8" watchedFiles="*.js;node_modules\*;routes\*.js;views\*.html"/>
</system.webServer>
</configuration>
有什么建议吗?
谢谢您的配置文件看起来有效。所以,你必须安装它,它工作得很好