使用IIS windows server时如何为静态文件提供服务器

使用IIS windows server时如何为静态文件提供服务器,iis,iis-8.5,iisnode,Iis,Iis 8.5,Iisnode,我尝试按照中的建议操作,但无法正确地为静态文件提供服务器。 我还查看了中的示例,哪一个更完整 可能是因为我使用的重写规则 <match url="/*" /> <action type="Rewrite" url="bin/www" /> 这看起来不像javascript。您确定要使用节点为文件提供服务吗?或者您正在尝试使用IIS windows server提供文件服务?因为节点服务器框架有内置的静态文件服务.web.config?当然,这不是JS,这是一个IIS

我尝试按照中的建议操作,但无法正确地为静态文件提供服务器。 我还查看了中的示例,哪一个更完整

可能是因为我使用的重写规则

 <match url="/*" />
 <action type="Rewrite" url="bin/www" />

这看起来不像javascript。您确定要使用节点为文件提供服务吗?或者您正在尝试使用IIS windows server提供文件服务?因为节点服务器框架有内置的静态文件服务.web.config?当然,这不是JS,这是一个IIS配置文件。是的,我知道node.JS可以为它们服务,但当将IIS与iisnode一起使用时,IIS提供了更好的性能,老实说,不太确定是否还有其他替代方案。
<configuration>
    <appSettings>
        <add key="virtualDirPath" value="/node" />
    </appSettings>
  <system.webServer>

    <handlers>
      <add name="iisnode" path="bin/www" verb="*" modules="iisnode" />
    </handlers>

    <rewrite>
      <rules>
        <rule name="StaticContent">
           <action type="Rewrite" url="public{REQUEST_URI}"/>
        </rule>

        <rule name="DynamicContent">  
            <conditions> 
                <add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True"/>  
            </conditions>  
            <match url="/*" />
            <action type="Rewrite" url="bin/www" />
         </rule> 
      </rules>
    </rewrite>

 <iisnode      
      node_env="localhost"
      nodeProcessCountPerApplication="1"
      maxConcurrentRequestsPerProcess="1024"
      maxNamedPipeConnectionRetry="100"
      namedPipeConnectionRetryDelay="250"      
      maxNamedPipeConnectionPoolSize="512"
      maxNamedPipePooledConnectionAge="30000"
      asyncCompletionThreadCount="0"
      initialRequestBufferSize="4096"
      maxRequestBufferSize="65536"
      watchedFiles="*.js;iisnode.yml"
      uncFileChangesPollingInterval="5000"      
      gracefulShutdownTimeout="60000"
      loggingEnabled="true"
      logDirectory="iisnode"
      debuggingEnabled="true"
      debugHeaderEnabled="false"
      debuggerPortRange="5058-6058"
      debuggerPathSegment="debug"
      maxLogFileSizeInKB="128"
      maxTotalLogFileSizeInKB="1024"
      maxLogFiles="20"
      devErrorsEnabled="false"
      flushResponse="false"      
      enableXFF="false"
      promoteServerVars=""
      configOverrides="iisnode.yml"
     />

  </system.webServer>
</configuration>