-
-
Save endzyme/1804046b23c37beba520 to your computer and use it in GitHub Desktop.
example configuration haproxy
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 | |
log /dev/log local0 | |
log /dev/log local1 debug | |
chroot /var/lib/haproxy | |
pidfile /var/run/haproxy.pid | |
uid 1100 | |
gid 1100 | |
daemon | |
stats socket /tmp/proxystats level admin | |
defaults | |
log global | |
mode http | |
option redispatch | |
option httplog | |
option dontlognull | |
contimeout 5s | |
clitimeout 3m | |
srvtimeout 3m | |
errorfile 400 /etc/haproxy/errors/400.http | |
errorfile 403 /etc/haproxy/errors/403.http | |
errorfile 408 /etc/haproxy/errors/408.http | |
errorfile 500 /etc/haproxy/errors/500.http | |
errorfile 502 /etc/haproxy/errors/502.http | |
errorfile 503 /etc/haproxy/errors/503.http | |
errorfile 504 /etc/haproxy/errors/504.http | |
listen stats :8181 | |
stats enable | |
stats refresh | |
stats uri /lb?stats | |
frontend https | |
bind *:443 ssl crt /etc/haproxy/ssl/mycert.pem | |
option forwardfor | |
default_backend webportal | |
backend webportal | |
http-check expect status 200 | |
option http-server-close | |
default-server inter 30s fastinter 5s downinter 30s slowstart | |
balance roundrobin | |
## stick-table type binary len 64 size 100m expire 15m | |
cookie JSESSIONID prefix | |
## appsession JSESSIONID len 32 timeout 30m request-learn | |
option httpchk GET /service/heartbeat | |
server n-197-150 192.168.197.150:443 cookie svr1 ssl check rise 3 fall 1 | |
server n-197-16 192.168.197.16:443 cookie svr2 ssl check rise 3 fall 1 | |
server n-197-15 192.168.197.15:443 cookie svr3 ssl check rise 3 fall 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment