Sequential domain search how?

I try this(not correct work):

frontend http
    bind *:80
    mode tcp
    default_backend http
backend http
    mode tcp
    balance roundrobin
    server web02 192.168.0.36:80 check
    server web01 192.168.0.37:80 check
frontend https
    bind *:443
    option tcplog
    mode tcp
    default_backend https
backend https
    mode tcp
    balance roundrobin
    option ssl-hello-chk
    server web02ssl 192.168.0.36:443 check
    server web01ssl 192.168.0.37:443 check

ssl certs contains in webserver1 and webserver2

i try nginx and cant setup https proxy pass. haproxy like more