Can I split a large HAProxy config file into multiple smaller files?

Configuration files can’t be linked together from a configuration directive. However HAProxy can load multiple configuration files from its command line, using the -f switch multiple times: haproxy -f conf/http-defaults -f conf/http-listeners -f conf/tcp-defaults -f conf/tcp-listeners If you want to be flexible with the amount of config files you can even specify a directory like … Read more

Validate haproxy.cfg

The official HaProxy configuration file check was buried in the help sections. /usr/local/sbin/haproxy –help There are two ways to check the haproxy.cfg syntax is to use.. One way is the /usr/local/sbin/haproxy -c -V -f /etc/haproxy/haproxy.cfg which validates the file syntax. The -c switch in the command represents the Check, while the others denote “Verbose” & … Read more

Difference between global maxconn and server maxconn haproxy

Willy got me an answer by email. I thought I would share it. His answers are in bold. I have a question about my haproxy config: #——————————————————————— # Global settings #——————————————————————— global log 127.0.0.1 syslog emerg maxconn 4000 quiet user haproxy group haproxy daemon #——————————————————————— # common defaults that all the ‘listen’ and ‘backend’ sections … Read more