是否可以将端口 80 用于 HTTP 和 Web 套接字流量? [英] Is it possible to use port 80 for both HTTP and web socket traffic?

查看:25
本文介绍了是否可以将端口 80 用于 HTTP 和 Web 套接字流量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 我正在构建一个使用网络套接字(技术上是 Flash 套接字)的网站,以提供实时通信.
  2. 我希望能够为公司/学术防火墙背后的人提供支持,这些防火墙会阻止除端口 80 之外的所有内容
  3. 我希望能够在一台机器上运行该网站

以前,我一直在使用 Apache 进行 HTTP 服务,并结合一些 python 在高编号套接字上侦听 websocket 内容,但这显然在这里不起作用.

Previously, I've been using Apache for HTTP serving combined with some python listening on a high-numbered socket for the websocket stuff, but that obviously won't work here.

我总是可以将 websocket 内容移动到单独的服务器,但我想避免为第二个 VPS 付费(并且必须通过网络而不是本地与数据库交谈).有没有好的方法可以做到这一点(nodejs,nginx,..?),还是不值得头疼?

I can always move the websocket stuff to a separate server, but I'd like to avoid paying for a second VPS (and have to talk to the database over the network instead of locally). Is there a good way to do this (nodejs, nginx, ..?), or is it not worth the headache?

推荐答案

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆