Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

haproxy acl not working in https/tcp mode

Tags:

haproxy

I am experiencing some problems, it seems I can't get acl's to work in tcp mode,
everything works in http mode.
Here is my config.

frontend  http *:80
    acl http_test_acl       path_beg    -i /test
    use_backend http_test   if http_test_acl
    default_backend         http_default

backend http_test
    balance   roundrobin
    server    httptest 10.10.10.10:80 check

backend http_default
    balance   roundrobin
    server    httpdefault 10.10.10.10:80 check

############# HTTPS #################
frontend  https *:443
    mode tcp
    acl https_test_acl         path_beg -i /test
    use_backend https_test     if https_test_acl
    default_backend            https_default

backend https_test
    mode tcp
    balance   roundrobin
    server    httpstest 10.10.10.10:443 check

backend https_default
    mode tcp
    balance   roundrobin
    server    httpsdefault 10.10.10.10:443 check

Don't pay attention to ip 10.10.10.10 as I have hidden my orginal one. Could you please let me know why https is not working, http frontend/backend acl rules are working just fine.

cheers

like image 904
Marcin Avatar asked Oct 16 '10 17:10

Marcin


1 Answers

Cause your https servers are in tcp mode (as they should be for ssl), so a layer 7 rule wont work.

like image 168
user510426 Avatar answered Dec 17 '22 02:12

user510426