56 lines
1.6 KiB
INI
56 lines
1.6 KiB
INI
global
|
|
log /dev/log local0
|
|
log /dev/log local1 notice
|
|
chroot /var/lib/haproxy
|
|
stats socket /var/lib/haproxy/admin.sock mode 660 level admin
|
|
|
|
stats timeout 30s
|
|
user haproxy
|
|
group haproxy
|
|
daemon
|
|
ca-base /etc/ssl/certs
|
|
crt-base /etc/ssl/private
|
|
ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256
|
|
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
|
|
|
|
defaults
|
|
log global
|
|
mode http
|
|
option httplog
|
|
option dontlognull
|
|
timeout connect 5000
|
|
timeout client 900000
|
|
timeout server 900000
|
|
|
|
listen stats
|
|
bind *:8404
|
|
stats enable
|
|
stats uri /stats
|
|
stats refresh 10s
|
|
stats admin if TRUE
|
|
stats auth admin:geoip2024
|
|
|
|
frontend http_front
|
|
bind *:80
|
|
option httplog
|
|
log-format "%ci:%cp [%tr] %ft %b/%s %TR/%Tw/%Tc/%Tr/%Ta %ST %B %CC %CS %tsc %ac/%fc/%bc/%sc/%rc %sq/%bq %hr %hs %{+Q}r"
|
|
default_backend webapp_backend
|
|
|
|
backend webapp_backend
|
|
balance source
|
|
option httpchk GET /health
|
|
http-response del-header Server
|
|
http-check expect status 200
|
|
retries 3
|
|
option redispatch
|
|
option http-server-close
|
|
option forwardfor
|
|
http-request add-header X-Forwarded-Proto http
|
|
compression algo gzip
|
|
compression type text/html text/plain text/css application/javascript application/json
|
|
|
|
server webapp1 127.0.0.1:5001 check inter 5s fall 3 rise 2 maxconn 50
|
|
server webapp2 127.0.0.1:5002 check inter 5s fall 3 rise 2 maxconn 50
|
|
server webapp3 127.0.0.1:5003 check inter 5s fall 3 rise 2 maxconn 50
|
|
server webapp4 127.0.0.1:5004 check inter 5s fall 3 rise 2 maxconn 50
|