I am trying to configure Pass through
SSL using HAproxy but I get a lot of errors
here my example
error detected while parsing ACL
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
But I am getting following errors
[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
I have tried to use code example from a lot of tutorials and articles even from official site, but each time I get parsing errors.