HAProxy听两个参数?

我一直使用双参数语法来看HAProxyconfiguration示例。 事实上,1.4.18提供的默认configuration文件包含这个:

listen appli1-rewrite 0.0.0.0:10001 cookie SERVERID rewrite balance roundrobin server app1_1 192.168.34.23:8080 cookie app1inst1 check inter 2000 rise 2 fall 5 server app1_2 192.168.34.32:8080 cookie app1inst2 check inter 2000 rise 2 fall 5 server app1_3 192.168.34.27:8080 cookie app1inst3 check inter 2000 rise 2 fall 5 server app1_4 192.168.34.42:8080 cookie app1inst4 check inter 2000 rise 2 fall 5 

我注意到完全没有任何绑定选项,所以我相信这是一个绑定的简写?

HAProxy文档( http://haproxy.1wt.eu/download/1.5/doc/configuration.txt )包含一个与此语法无关的例子,但不指定,文档或解释它在任何地方。

文档只显示listen <name>

 All proxy names must be formed from upper and lower case letters, digits, '-' (dash), '_' (underscore) , '.' (dot) and ':' (colon). ACL names are case-sensitive, which means that "www" and "WWW" are two different proxies. 

(即没有空格,所以这显然不只是名称的一部分)

有这个语法的官方文档吗?

谢谢。

我想我只是通过在superuser.com上find这个答案来解决这个问题 。 在HAProxy 1.3.x中, 已弃用的参考手册说:

 2) Declaration of a listening service ===================================== Service sections start with the 'listen' keyword : listen <instance_name> [ <IP_address>:<port_range>[,...] ] 

1.4手册不再存在 ,但似乎这种语法继续被接受为向后兼容。 在1.6中,没有bind指令的listen部分开始产生警告 。

所以答案是这是旧的语法,不应该再使用。