Use HAProxy alongside Apache & a Websocket Server, both on port 80
Having trouble with firewalls blocking your users from that new websocket server you set up on port 3000? Can't put it on port 80 because that's where you're using that for HTTP with Apache? Can't be arsed with modules, or switching to Nginx?
Quick and easy solution: Set up HAProxy (a load balancer) to point different sub-domains to different ports internally. E.g.:
http://ws.mydomain.com:80 -> http://mydomain.com:3000
http://www.mydomain.com:80 -> http://mydomain.com:8080
Problem solved :) works great with socket.io too.
Written by Daniel Hough
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Socket.io
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#