node.js - node 绑定域名
天蓬老师
天蓬老师 2017-04-17 13:19:34
0
6
792

我的域名绑定了ip 我的node监听的是80端口 使用ip可以直接看到页面不加端口 我自己试了别的端口 我绑定3000端口 只要ip或者域名后面加:3000都可以访问 如果我监听80怎么弄才能直接域名就访问

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(6)
洪涛

Configure a reverse proxy server for distribution, you can use nginx or apache. You can even write it directly in nodejs. The recommended npm module is http-proxy, you can give it a try.

伊谢尔伦

Is this the case? What error does the browser report? 404? Also, is the IP returned by the ping URL the bound IP?

洪涛

You need to configure an nginx

大家讲道理

This is a problem with the cooperation between Nodejs and nginx; just configure nginx.

小葫芦

If you listen to port 80, you can access it using the domain name

巴扎黑

How to solve this problem and what to do next after using npm http-proxy

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template