Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4718

Route by domain name not working

$
0
0

@asche wrote:

hello,

routing by domain name ist not workin in my setup.
when i connect from a client with the command

mysql -htest-db2.example.com -uxxx -pxxx

i get every time connected to server db1 (172.17.2.111).
i think acl ist ignored and default_backend used.

my os ist ubuntu 16.04 with haproxy 1.6.3

please can anybody help me?

my config:

frontend mysql
bind 0.0.0.0:3306
mode tcp
acl usedb1 hdr(host) -i test-db1.example.com
acl usedb2 hdr(host) -i test-db2.example.com
use_backend mysql-db1 if usedb1
use_backend mysql-db2 if usedb2
default_backend mysql-db1

backend mysql-db1
mode tcp
server db1 172.17.2.111:3306 check
server db2 172.17.2.112:3306 check backup

backend mysql-db2
mode tcp
server db1 172.17.2.111:3306 check backup
server db2 172.17.2.112:3306 check

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4718

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>