On 18/12/2015 08:05 μμ, Edward Hart (c) wrote: > I am new to HAProxy, and am responsible for analyzing the security of > our instance. > > > > Q. Will the last config file overwrite the first config file? > > > > In our environment, we have multiple config files. Different teams > manage different aspects of the environment, and so maintain their own > config files. The directory tree looks like this: > > > > /etc/haproxy/ > > | > > | - haproxy.cfg > > | > > | -conf.d/ > > | - conf1.conf > > | - conf2.conf > > | - etc. > > > > When the haproxy service is started, it does properly read all of the > config files.
I believe, haproxy relays the process of loading multiple file to the filename expansion like *.conf by your shell, so they are loaded in the order which are resolved by the expansion. > In haproxy.cfg we have a defaults section. Assume that > the global section is properly configured. > > > > defaults > > log global > > option httplog > > other keywords > > > > If conf1.conf were to contain its own defaults section, which conflicted > with haproxy.conf, e.g., > > > > defaults > > log global > > option tcplog > > > > Would the conf1.conf defaults section overwrite the defaults section in > haproxy.cfg? > > Yes, but only the ones defined in conf1.conf's defaults section, the rest are inherited by the previous defaults section. Cheers, Pavlos
signature.asc
Description: OpenPGP digital signature