Created
October 18, 2010 14:30
-
-
Save yuri-ko/632300 to your computer and use it in GitHub Desktop.
haproxy config to work with miksago's node-websocket-server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
maxconn 4096 | |
user haproxy | |
group haproxy | |
debug | |
defaults | |
timeout client 60000 | |
timeout server 30000 | |
timeout connect 4000 | |
frontend http_in | |
mode http | |
bind *:80 | |
option http-server-close | |
acl is_websocket hdr(Upgrade) -i WebSocket #check the Upgrade header | |
acl is_websocket hdr_beg(Host) -i ws #also check the host | |
use_backend node_ws if is_websocket | |
default_backend nginx_static | |
backend node_ws | |
mode http | |
option http-pretend-keepalive | |
server node_ws_1 127.0.0.1:8585 check | |
backend nginx_static | |
mode http | |
server nginx_static_1 127.0.0.1:8000 check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment