# Example configuration file for HAProxy 2.0, refer to the url below for
# a full documentation and examples for configuration:
# https://cbonte.github.io/haproxy-dconv/2.0/configuration.html
# Global parameters
global
# Log events to a remote syslog server at given address using the
# specified facility and verbosity level. Multiple log options
# are allowed.
#log 10.0.0.1 daemon info
# Specifiy the maximum number of allowed connections.
maxconn 32000
# Raise the ulimit for the maximum allowed number of open socket
# descriptors per process. This is usually at least twice the
# number of allowed connections (maxconn * 2 + nb_servers + 1) .
ulimit-n 65535
# Drop privileges (setuid, setgid), default is "root" on OpenWrt.
uid 0
gid 0
# Perform chroot into the specified directory.
#chroot /var/run/haproxy/
# Daemonize on startup
daemon
nosplice
# Enable debugging
#debug
# Spawn given number of processes and distribute load among them,
# used for multi-core environments or to circumvent per-process
# limits like number of open file descriptors. Default is 1.
#nbproc 2
defaults
log global
mode tcp
option dontlognull
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
listen stats
bind :::8000 v4v6
mode http
http-request use-service prometheus-exporter if { path /metrics }
stats enable
stats uri /stats
stats realm HAProxy-04\ Statistics
stats auth admin:admin
stats admin if TRUE
frontend fe_http
bind :::6688 v4v6
mode tcp
default_backend be_http
frontend fe_https
bind :::6689 v4v6
mode tcp
default_backend be_https
backend be_http
mode tcp
server haproxy102 192.168.20.102:6688 send-proxy check
backend be_https
mode tcp
server haproxy102 192.168.20.102:6689 send-proxy check