简体   繁体   中英

Socket.io on port 80

I've made a node application which listens on port 80, my application works fine on localhost, but when I run it on my VPS, I get a different log and a different result ( websockets just don't work )

Are you running a web server in front of your node app on your VPS? If so, make sure it is new enough and properly configured to do websockets. For instance, on modern Ubuntu the stock nginx is not new enough yet to support web sockets, so you have to install a separate package to get websocket support.

2nd guess: is there a proxy server between your browser and your VPS?

Have you run it as the super user on the VPS? Normal users are typically blocked from opening ports below 1024.

Our server hosted on VPS, using port 80. The io connection fired through cellular data and through WIFI fine, but in some wifi networks it didn't.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM