I am new to HAPROXY, tried looking into some of online resources but didnt find anything suitable. I was trying to setup haproxy to accept SSH connection to multiple backend boxes as you would do to HTTP connection.

for example something like:

frontend webnode
    bind *:80
    reqadd X-Forwarded-Proto:\ http

    acl host_1 hdr(host) -i one
        acl host_2 hdr(host) -i two
        acl host_3 hdr(host) -i three
        acl host_4 hdr(host) -i four

        use_backend host_1 if host_1
        use_backend host_2 if host_2
        use_backend host_3 if host_3
        use_backend host_4 if host_4

backend........{for selected host_x}

works for both SSL/HTTP, however i could quite get grasp on SSH (wondering if this is something possible at all?)

I was trying to use same logic as "https://dgl.cx/2010/01/haproxy-ssh-and-ssl-on-same-port";
but failing badly on nested condition for multiple host.

Reply via email to