aur/haproxy.cfg
Whyme Lyu 095c2736ef haproxy 3.3.4-1
- Upgrade to 3.3.4
- Move chroot notice to config file. Don't print it everytime
- Tune pkgdesc
2026-02-20 14:28:05 +08:00

49 lines
1.5 KiB
INI

#---------------------------------------------------------------------
# Example configuration. See the full configuration manual online.
#
# http://www.haproxy.org/download/2.5/doc/configuration.txt
#
#---------------------------------------------------------------------
global
maxconn 20000
log 127.0.0.1 local0
user haproxy
# NOTE: with chroot, logging to journald won't work.
# Either disable chrooting, use rsyslog, or bind
# /run/systemd/journal/dev-log into the chroot.
chroot /usr/share/haproxy
pidfile /run/haproxy.pid
daemon
frontend main
bind :5000
mode http
log global
option httplog
option dontlognull
option forwardfor except 127.0.0.0/8
maxconn 8000
timeout client 30s
acl url_static path_beg -i /static /images /javascript /stylesheets
acl url_static path_end -i .jpg .gif .png .css .js
use_backend static if url_static
default_backend app
backend static
mode http
timeout connect 5s
timeout server 5s
server static 127.0.0.1:4331 check
backend app
mode http
timeout connect 5s
timeout server 30s
timeout queue 30s
server app1 127.0.0.1:5001 check
server app2 127.0.0.1:5002 check
server app3 127.0.0.1:5003 check
server app4 127.0.0.1:5004 check