是否可以将配置参数(在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> ...
frontend
https-in bind :443 ssl strict-sni
crt </path/to/cert1.pem>
crt </path/to/cert2.pem>
crt </path/to/cert3.pem>
...
$ /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.
答案 0 :(得分:0)
您不能在haproxy.cfg中执行多行语法。
看看文件格式文档:https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#2.1