1. 程式人生 > >HAproxy 新增多個配置檔案

HAproxy 新增多個配置檔案

Here is how I manage this :

I write a different frontend/backend file for each frontend :

then when I start :

is doing : CPPPCI HAPROXY_CONFDIR/HAPHOSTI HAPROXY_CONFDIR/backend -IHAPROXY C ONFDIR/frontendo HAPROXY_CONF $HAPROXY_CPP

which basically rebuild one config file. Very fast and you still have
the flexibility to manually remove a frontend quickly.

Note that the genconf.py is old now and need to be fixed (header
manipulations…)