我遇到了一些问题,似乎我无法让 acl 在 tcp 模式下工作,
一切都在 http 模式下工作。
这是我的配置。
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
不要关注 ip 10.10.10.10 因为我已经隐藏了我原来的那个。您能否让我知道为什么 https 不起作用,http 前端/后端 acl 规则工作得很好。
干杯