HAProxy: правильный синтаксис для одного домена с несколькими / paths - PullRequest
0 голосов
/ 04 июня 2019

Как бы я смог выполнить следующее с помощью 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

Любая помощь будет принята с благодарностью.

...