haproxy access list using path_dir having issues with firefox
Posted
by
user11243
on Server Fault
See other posts from Server Fault
or by user11243
Published on 2011-03-18T07:33:59Z
Indexed on
2011/03/18
8:11 UTC
Read the original article
Hit count: 292
I'm trying to route all requests containing a path directory of /socket.io/ to a separate port with HAProxy.
Here is my config file:
global
maxconn 4096 # Total Max Connections. This is dependent on ulimit
nbproc 2
defaults
mode http
frontend all 0.0.0.0:80
timeout client 86400000
default_backend web_servers
acl is_stream path_dir socket.io
use_backend stream_servers if is_stream
backend web_servers
balance roundrobin
option forwardfor # This sets X-Forwarded-For
timeout server 30000
timeout connect 4000
server web1 127.0.0.1:4000 weight 1 maxconn 1024 check
backend stream_servers
balance roundrobin
option forwardfor # This sets X-Forwarded-For
timeout queue 5000
timeout server 86400000
timeout connect 86400000
server stream1 127.0.0.1:5100 weight 1 maxconn 1024 check
URL paths with a /socket.io/ get correctly directed to port 5100 in chrome and safari. However not for firefox.
I'm running Haproxy locally on my mac for dev, not sure if it has anything to do with it.
I'm using haproxy 1.4.8 and Firefox 3.6.15.
I've tried clearing cache on firefox and it didn't help, so I'm thinking there's something wrong with the way HAProxy parses through the Firefox request headers.
© Server Fault or respective owner