如何使用HAProxy完成以下任务?
位置:
/path1 is on server 10.10.10.1 server1.example.com port 8080
/path2 is on server 10.10.10.1 server1.example.com port 8080
/path3 is on server 10.10.10.2 server2.example.com port 8090
我的语法
基于许多网站。
frontend
...
use_backend be_domain1 if { ssl_fc_sni domain1.example.com } # content switching based on SNI
backend be_domain1
mode http
option tcp-check
acl static hdr_dom(Host) -i server1.example.com
acl static path_beg -i /path1/ /path2/
server server1 server1.example.com:8080 check port 8080
acl static hdr_dom(Host) -i server2.example.com
acl static path_beg -i /path3/
server server2 server2.example.com 8090 check port 8090
任何帮助将不胜感激。