Skip to content

Instantly share code, notes, and snippets.

@xeron
Forked from asabirov/haproxy.cnf
Created September 21, 2011 16:50
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save xeron/1232627 to your computer and use it in GitHub Desktop.
Save xeron/1232627 to your computer and use it in GitHub Desktop.
haproxy.cnf
global
log 127.0.0.1 local0
log 127.0.0.1 local0 notice
maxconn 4096
nbproc 1
pidfile /var/run/haproxy.pid
user haproxy
group haproxy
defaults
mode http
frontend all 85.17.162.170:80
timeout client 86400000
default_backend nginx_backend
acl is_websocket hdr(Upgrade) -i WebSocket
acl is_websocket hdr_beg(Host) -i ws
acl is_faye url_sub faye
use_backend faye_backend if is_faye
use_backend ws_backend if is_websocket
backend ws_backend
option forwardfor
timeout queue 5000
timeout connect 86400000
timeout server 86400000
server server1 85.17.162.170:9696 maxconn 2000 check
backend faye_backend
option forwardfor
timeout connect 4000
timeout server 30000
server server1 85.17.162.170:9696 maxconn 1024 check
backend nginx_backend
option forwardfor
timeout connect 4000
timeout server 86400000
server server1 85.17.162.170:8081 maxconn 1024 check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment