configuration文件中的HAProxy错误

我正在尝试使用HAproxyconfigurationPass through SSL,但是我收到了很多错误

这里是我的例子

parsingACL时检测到错误

 frontend public_ssl mode tcp option tcplog bind *:443 tcp-request inspect-delay 5s tcp-request content accept if { req.ssl_hello_type 1 } acl foo_app_bar req.ssl_sni -i bar.example.com acl foo_app_baz req.ssl_sni -i baz.example.com use_backend foo_bk_bar if foo_app_bar use_backend foo_bk_baz if foo_app_baz default_backend foo_bk_default 

但是我得到以下错误

 [ALERT] 339/143013 (3828) : parsing [/etc/haproxy/haproxy.cfg:45] : error detected in frontend 'public_ssl' while parsing 'if' condition [ALERT] 339/143013 (3828) : parsing [/etc/haproxy/haproxy.cfg:47] : error detected while parsing ACL 'foo_app_bar'. [ALERT] 339/143013 (3828) : parsing [/etc/haproxy/haproxy.cfg:48] : error detected while parsing ACL 'foo_app_baz'. [ALERT] 339/143013 (3828) : parsing [/etc/haproxy/haproxy.cfg:50] : error detected while parsing switching rule. [ALERT] 339/143013 (3828) : parsing [/etc/haproxy/haproxy.cfg:51] : error detected while parsing switching rule. [ALERT] 339/143013 (3828) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg 

我曾尝试使用来自官方网站的很多教程和文章中的代码示例,但是每次都得到parsing错误。

感谢大家的帮助。 问题在于HAProxy古老版本。 因为我使用apt-get install haproxy 。 版本1.4 2013

我刚刚从源代码编译1.7版本,并开始罚款。

谢谢。