Redirect websockets to port?

Posted by DigitalMan on Server Fault See other posts from Server Fault or by DigitalMan
Published on 2012-11-05T22:50:02Z Indexed on 2012/11/05 23:03 UTC
Read the original article Hit count: 138

So, I've got a WebSocket server in C++, that is a completely stand-alone entity - handles header parsing, receiving, sending, all of it on its own, listening directly to the port.

Problem is, it needs to run on a server alongside Apache, and that's a bit of a problem. Now, there was a solution here to a similar issue involving mod_proxy, but I'm hoping I can intercept and redirect WebSocket communication before Apache even knows about it, possibly with iptables.

So the question is, is it possible to direct traffic bound for chat.mysite.net to a WebSocket server on, say, port 8080, while anything else headed to mysite.net proceeds as expected to Apache?

© Server Fault or respective owner

Related posts about linux

Related posts about apache2