On 1 February 2014 12:32, Sukanta Saha <[email protected]> wrote: > Thanks for all your help, I will try, > > I have one more question that is about the haproxy.conf file , in this file > we have written so many backends which are getting called from the > frontends. > Is there a way that I can seperate out the backends in multiple config files > and from my main haproxy.conf file I will call those files. > So that the main files looks clean and nice and I will have multiple config > files for my each service or backends . If I need to change anything for a > service I will change the corresponding config file not the main file.
HAProxy can accept multiple "-f <configfile>" parameters when it's started, but I /believe/ there are some constraints on the files' contents, such as each section must be fully defined in a single file. I forget the exact details and don't have them to hand. You'll probably need to change your init script to support this as well. Also, there isn't an "include" directive you can use inline, in the config file. There is some talk about it on this list, but I don't believe it's available yet - if ever. You may also find people have written init wrappers that simulate this or other multiple-config-file behaviours. I don't have a link to them myself, but you may find them mentioned somewhere in the list archives: http://marc.info/?l=haproxy Cheers, Jonathan

