一、首先下载iisnode.exe

https://github.com/tjanczuk/iisnode/wiki/iisnode-releases  链接

安装完毕!

二、打开IIS 7

选中 Default Web Site  右侧

1、选择浏览   删除文件夹内的东西   然后把项目复制进这个文件夹下面

2、点击绑定 IP 域名

项目根目录下 新建 Web.config 文件 内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="iisnode" path="launch.js" verb="*" modules="iisnode" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<iisnode promoteServerVars="REMOTE_ADDR" watchedFiles="*.js;node_modules\*;routes\*.js;views\*.jade" nodeProcessCommandLine="C:\Program Files\nodejs\node.exe" />
<rewrite>
<rules>
<rule name="all" patternSyntax="Wildcard">
<match url="*" />
<action type="Rewrite" url="launch.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

项目根目录下 新建 launch.js 文件  内容如下:

#!/usr/bin/env node

require('./bin/www');

然后浏览 域名就OK了!

如果出现:

iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status:
HTTP reason: Internal Server Error
You are receiving this HTTP response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'. In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem. The node.exe process has not written any information to stderr or iisnode was unable to capture this information. Frequent reason is that the iisnode module is unable to create a log file to capture stdout and stderr output from node.exe. Please check that the identity of the IIS application pool running the node.js application has read and write access permissions to the directory on the server where the node.js application is located. Alternatively you can disable logging by setting system.webServer/iisnode/@loggingEnabled element of web.config to 'false'.

解决办法:找到项目文件夹 右键

到此结束 有问题的欢迎留言!~

iis 和 node express 共用80端口 iisnode 全过程的更多相关文章

  1. 利用IIS应用请求转发ARR实现IIS和tomcat整合共用80端口

    现在网上流传的实现iis和tomcat共享80端口的方法是基于isapi_redirect插件实现的, 我的实现方法不同, 原理相似,具有更好的优点. 先说下基于isapi_redirect缺点,ja ...

  2. IIS与Apache共用80端口方法

    IIS与Apache共用80端口 http://www.cnblogs.com/haocool/p/3595282.html Windows server 2003服务器上安装有默认 IIS 6和Ap ...

  3. IIS和tomcat共用80端口

    IIS和tomcat共用80端口 很多机器都需要同时使用tomcat和iis两个服务器以部署不同的网站,而解决共用80端口的问题也经常遇到,今天实际操作了一回,以下是具体步骤: 实现tomcat和ii ...

  4. iis和apache共用80端口,IIS代理转发apache

    为什么共用80端口应该不用多说了,服务器上程序运行环境有很多套,都想抢用80端口,所以就有了共用80端口的解决方案. 网上很多的教程一般都是设置APACHE使用默认80端口,代理转发IIS的网站,II ...

  5. apache与IIS共用80端口冲突解决方法

    如果同一台电脑安装了apache和iis,会提示80端口冲突,如何解决apache与iis 80端口冲突的问题呢,并且同时使用apache和iis 将apache设为使用80端口,IIS使用其它端口, ...

  6. IIS tomcat共用80端口解决一个IP多个域名:使用Nginx反向代理方式使两者兼容

    环境: windows server 2003,IIS6服务器,Tomcat7服务器 域名有几个: 以下是使用IIS的域名: http://www.formuch.com/ http://www.fo ...

  7. (转)IIS tomcat共用80端口解决一个IP多个域名:使用Nginx反向代理方式使两者兼容

    from :http://www.cnblogs.com/wuyou/p/3455619.html 环境: windows server 2003,IIS6服务器,Tomcat7服务器 域名有几个: ...

  8. IIS7和Tomcat7整合,即IIS7和Tomcat共用80端口

    IIS7和Tomcat7整合,即IIS7和Tomcat共用80端口 背景: 最近公司有一个项目要上线,需要用到iis和tomcat整合,共用80端口.由于公司的数据都非常重要,只通过端口映射到外网的8 ...

  9. 安装酷痞到IIS7.x共用80端口Windows(64位)系统下运行多个酷痞

    需求: 1.酷痞直接运行的模式是自宿主运行.由于win系统一般都由iis提供多个网站服务,并首先占用了80端口,如果想酷痞可以直接通过主机头和iis共用80端口会出现这种运行模式的需求. 以下是实现方 ...

随机推荐

  1. Spring Boot系列(二) Spring Boot 之 REST

    Rest (Representational Stat Transer) 是一种软件架构风格. 基础理论 架构特性 性能 可伸缩 简化的统一接口 按需修改 组件通信透明 可移植 可靠性 架构约束 C/ ...

  2. Leetcode-35.搜索插入位置

    题目描述: 给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引.如果目标值不存在于数组中,返回它将会被按顺序插入的位置. 你可以假设数组中无重复元素. 示例 1: 输入: [1,3,5,6 ...

  3. git知识总结-2.git基本操作之操作汇总

    0.前言 一般来说,日常使用只要记住下图6个命令,就可以了.但是熟练使用,恐怕要记住60-100个命令. 上图分别为: Workspace:工作区 Index / Stage:暂存区 Reposito ...

  4. certificate & encryption

    openssl commonly used commands before use Configure to generate Makefile, should notice follow optio ...

  5. windows 下 配置 github

       github   功能介绍 1. 记录多个版本 2.查看历史操作,可以进行版本回退和前进的控制 3. 多端共享代码,自动合成  Github  与  SVN   1.  SVN 版本集中管理,所 ...

  6. Qt-c++桌面编程报错:qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "",已解决

    语言:c++ 编译库:Qt GUI,qt5.12.1 软件类型:Qt application,qt桌面软件 运行平台:window 10 ?按照[https://www.devbean.net/201 ...

  7. 概率dp的边界处理 POJ 2096

    题目地址:https://vjudge.net/problem/POJ-2096 说的是有n个bug,和s个系统.现在一个人一天能发现一个bug,它可能是任何一个系统中的,也可能会发现已经发现过的bu ...

  8. Docker----与Asp.net core 的完美结合,在docker容器中创建Asp.Net Core 项目

    在腾讯云上买了一个小容量的服务器,搭建一个docker环境后,可以尝试做一些单系统做起来很麻烦的东西.譬如说,你在windows OS或UbuntuOS中,突然想玩CentOS了,你可以选择将电脑再装 ...

  9. md5加密 bas64加密

    /** * 获取bas64加密的算法 * @param str * @return */ public static String getBase64(String str) { byte[] b = ...

  10. Java生日计算年龄工具

    package com.web.backend.util; import java.util.Calendar;import java.util.Date; /** * @Author: SongZS ...