小编bea*_*ver的帖子

Haproxy 多线配置

是否可以将配置参数 (in haproxy.cfg)拆分为多行?

例子

当前的

frontend
     https-in bind :443 ssl strict-sni crt </path/to/cert1.pem> crt </path/to/cert2.pem> crt </path/to/cert3.pem> ...
Run Code Online (Sandbox Code Playgroud)

理想的

frontend 
    https-in bind :443 ssl strict-sni
        crt </path/to/cert1.pem>
        crt </path/to/cert2.pem>
        crt </path/to/cert3.pem>
        ...
Run Code Online (Sandbox Code Playgroud)

尝试理想时出错

$ /usr/sbin/haproxy -c -V -f /etc/haproxy/haproxy.cfg
[ALERT] 343/210133 (25646) : parsing [/etc/haproxy/haproxy.cfg:45] : unknown keyword 'crt' in 'frontend' section
[ALERT] 343/210133 (25646) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
[ALERT] 343/210133 (25646) : Fatal errors found in configuration.
Run Code Online (Sandbox Code Playgroud)

haproxy

7
推荐指数
1
解决办法
3771
查看次数

标签 统计

haproxy ×1