惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
小众软件
小众软件
博客园 - 叶小钗
宝玉的分享
宝玉的分享
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
U
Unit 42
F
Fortinet All Blogs
IT之家
IT之家
Y
Y Combinator Blog
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The GitHub Blog
The GitHub Blog
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - EricWen

IntelliJ IDEA 2024 安装与激活全攻略 Excel高手秘籍:50招助你效率翻倍 Navicat与DBeaver:数据库管理工具界的“蝙蝠侠”与“钢铁侠” 十年沉淀,重启开发之路 Common Issues Which Cause Roles to Recycle How to remove a batch of VMs and related Disks How to create a batch of VMs with PowerShell How to build windows azure PowerShell Source Code 如何快速从一个Storage Account拷贝到另一个账号 比较Windows Azure 网站(Web Sites), 云服务(Cloud Services)and 虚机(Virtual Machines) Windows Azure 云服务角色架构 如何批量删除虚拟机及其关联的存储(Windows Azure) PowerShell Script to Deploy Multiple VM on Azure in Parallel #azure #powershell Use Windows Azure AD to create SSO projects 怎样提高Windows Azure Cloud Service中的WebRole的文件访问权限 Windows Azure 名词定义(Glossary) 怎样将SQL Azure数据库备份到本地或者Storage 自动备份SQL数据库到云存储Storage 数据库SQL Server DAC 导入导出数据到SQL Azure问题
外网不能访问部署在虚机的NodeJs网站(80端口)
EricWen · 2014-05-07 · via 博客园 - EricWen

    外网能访问部署在虚机的NodeJs网站需注意如下:

    1. 在管理门户上配置端点(Http 80->80)

    clip_image001

    1. 在虚机中的防火墙入站规则中增加应用程序Node.exe的允许规则

    clip_image002

    1. 启动NodeJs的侦听进程时,需要侦听所有IP(0.0.0.0)

    示例代码如下:

    var http = require('http');

    http.createServer(function (req, res) {

      res.writeHead(200, {'Content-Type': 'text/plain'});

      res.end('Hello World\n');

    }).listen(80,"0.0.0.0");

    console.log('Server running.');

posted @ 2014-05-07 22:28  EricWen  阅读(4539)  评论(0)    收藏  举报