我的域名绑定了ip 我的node监听的是80端口 使用ip可以直接看到页面不加端口 我自己试了别的端口 我绑定3000端口 只要ip或者域名后面加:3000都可以访问 如果我监听80怎么弄才能直接域名就访问
欢迎选择我的课程,让我们一起见证您的进步~~
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
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