是否有可能使用端口80用于HTTP和网络接口的流量? [英] Is it possible to use port 80 for both HTTP and web socket traffic?
问题描述
- 我要建,为了提供实时通信使用网络插座(技术上闪存插槽)的网站。
- 我希望能够支持人们背后阻止除端口80 家居企业/学术防火墙
- 我希望能够运行的网站从一台机器的
- I'm building a site that uses web sockets (technically Flash sockets) in order to provide real-time communication.
- I want to be able to support people behind corporate/academic firewalls that block everything except port 80
- I'd like to be able to run the site off of a single machine
previously,我一直在使用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?
推荐答案
- HTTP://$c$c.google.com/p/pywebsocket/
- What流行的Web服务器对HTML5的WebSocket?支持
- http://serverfault.com/questions/201825/how-would-i-configure-a-websocket-server-to-run-alongside-a-webserver
- http://code.google.com/p/pywebsocket/
- What popular webservers have support for HTML5 WebSocket?
- http://serverfault.com/questions/201825/how-would-i-configure-a-websocket-server-to-run-alongside-a-webserver
另一种可能是使用的mod_proxy在Apache中的请求重定向到一个WebSocket伺服器。
Another possibility is to use mod_proxy in apache to redirect the requests to a websocket server.
这篇关于是否有可能使用端口80用于HTTP和网络接口的流量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!