Hello Expert!

I am going to set a long list of L7 rules in my HAProxy.  For better 
management, I'd like split the L7 rules in the "frontend" section.  For 
example, I'd like to split haproxy.cfg into two files, the 2nd one named as 
haproxy.cfg.apps, which has only the L7 configuration.  See the configuration 
example below.  
haproxy.cfg
=======================
......
frontend PUBLIC
        bind :80

haproxy.cfg.apps
=======================
......
        # App1
        acl rec_w6 path_beg /A
        acl rec_w6 path_beg /B
        acl rec_w6 path_beg /C /D
        use_backend App1-Backend if rec_w6

        # App2
        #===================
        acl rec_w7 path_beg /X

        use_backend App2-Backend if rec_w7

However, when I start it as "./sbin/haproxy -f haproxy.cfg -f 
haproxy.cfg.apps", it threw fatal errors as below, 
[ALERT] 171/184158 (508) : parsing [haproxy.cfg:apps:4]: unknown keyword 'acl' 
out of section.
[ALERT] 171/184158 (508) : parsing [haproxy.cfg.apps:5]: unknown keyword 'acl' 
out of section.
[ALERT] 171/184158 (508) : parsing [haproxy.cfg.apps:6]: unknown keyword 'acl' 
out of section.
[ALERT] 171/184158 (508) : parsing [haproxy.cfg.apps:7]: unknown keyword 
'use_backend' out of section.
[ALERT] 171/184158 (508) : Error(s) found in configuration file : 
haproxy.cfg.apps
[ALERT] 171/184158 (508) : Fatal errors found in configuration.

Could someone tell me if there is a way to do it?

Thanks, Q.Xie

Reply via email to