-
-
Save arunoda/a35f69f8b7a385d06a8d to your computer and use it in GitHub Desktop.
Haproxy Config File
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 | |
quiet | |
stats socket /var/run/haproxy.sock level admin | |
#make sure there is an unpreviledged user named "haproxy" | |
user haproxy | |
group haproxy | |
defaults | |
maxconn 20000 | |
log global | |
mode http | |
retries 3 | |
option redispatch | |
option http-server-close | |
timeout connect 60s | |
timeout server 60s | |
timeout client 60s | |
timeout check 5s | |
frontend public | |
#binding port 80 | |
bind *:80 | |
default_backend apps | |
backend apps | |
#load balancing algorithm | |
balance leastconn | |
#using JSESSIONID as the cookie | |
cookie JSESSIONID insert nocache | |
#adding server | |
server host1 host1.example.com cookie host1 | |
server host2 host2.example.com cookie host2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment