Using websockets with Apache
I'm trying to开发者_运维问答 leverage websockets using PHP. In order to avoid firewall restrictions the websockets should use port 80. However apache is already running on port 80 and AFAIK apache doesn't support websockets.
I found a 3rd party apache module: http://code.google.com/p/pywebsocket/
But it's partly in Japanese and marked as experimental.
Is this my best bet?
Here is a brief tutorial to get you started with pywebsockets and Apache: http://chemicaloliver.net/internet/getting-started-web-sockets-using-pywebsocket-mod_python-and-apache-in-ubuntu/
Add another IP to the server and bind the websocket app on that IP.
Recap.:
- IP1: Apache - port 80 (You will need to change Apache to bind only to this IP)
- IP2: websocket app - port 80
There you go.
I decided to use port 8080 which is a commonly used port for web apps.
精彩评论