zoukankan      html  css  js  c++  java
  • nodejs 开发服务端 部署到 iis 服务器环境 -- iisnode 安装问题解决记录

    开发环境

    • nodejs: v10.15.3
    • windows: 10
    • iis: 10

    需求:
    Nodejs开发了服务端,要部署到IIS

    需要在IIS服务器上安装iisnode,结果遇到问题:安装不上


    记录一下针对以上问题的调查结果解决方案:

    解决过程:

    • 1、 通过 Web Platform Installer 安装 IISNode for IIS,结果失败。

        原因:本机 IIS 10.0,报错:需要 IIS 7.x
        很明显不可能去改用 IIS 7.x

    • 2、 下载 msi 安装包直接安装

        path: Azure/iisnode

    • 3、 安装完成后,查看 Web Platform Installer 里也相应的变为已安装了。

    • 4、 IIS 中新建站点,配置 web.config 并测试你的站点

        结果:访问成功

      参考配置内容贴在下方

      <configuration>
        <system.webServer>
      
          <!-- indicates that the hello.js file is a node.js application 
          to be handled by the iisnode module -->
      
          <handlers>
            <add name="iisnode" path="server.js" verb="*" modules="iisnode" />
          </handlers>
          
          <rewrite>
            <rules>
              <rule name="myapp">
                <match url="/*" />
                <action type="Rewrite" url="server.js" />
              </rule>
            </rules>
          </rewrite>
      
        </system.webServer>
      </configuration>
    

    解决过程中发现网上有人遇到同样问题,但没有找到解决办法,

    在某云网站上的提问问题下,为了贴上自己的回答,特意现注册了下。。。

    链接在此

    作者:码路工人

    公众号:码路工人有力量(Code-Power)

    欢迎关注个人微信公众号 Coder-Power

    一起学习提高吧~

  • 相关阅读:
    利用STM32播放音乐
    在MDK中使用$Sub$$和$Super$$的记录
    printf函数输出格式控制记录
    I2C软件实现
    C语言单项链表
    CreateEvent函数使用记录
    C语言宏定义使用记录
    GIT推送本地数据到远程空仓库
    2020-ECCV-Local Correlation Consistency for Knowledge Distillation阅读笔记
    2020-ECCV-Feature Normalized Knowledge Distillation for Image Classfication阅读笔记
  • 原文地址:https://www.cnblogs.com/CoderMonkie/p/deploy-nodejs-server-to-iis-use-iisnode.html
Copyright © 2011-2022 走看看