global
log 127.0.0.1 local0 debug
# log /var/log local0 info
chroot /var/lib/haproxy
# user haproxy
# group haproxy
maxconn 2000
defaults
log global
mode tcp
option tcplog
option dontlognull
timeout connect 500000
timeout client 500000
timeout server 500000
userlist hasler
group adm users admin
user admin insecure-password Hasler3018
WEB
##################################################################
frontend web
mode http
bind *:80
# Define ACL based on host names
acl c2c_hostname hdr(host) -i c2c.evaplus.com
acl multi_hostname hdr(host) -i haslerrail.evaplus.com
acl c2c_ip hdr(host) -i 52.214.141.171
acl host_www hdr_beg(host) -i www.evaplus.com
acl ussugar_hostname hdr(host) -i ussugar.evaplus.com
acl adl_hostname hdr(host) -i adl.evaplus.com
acl nor_hostname hdr(host) -i nor.evaplus.com
acl int_hostname hdr(host) -i int.evaplus.com
acl drs_hostname path_beg /drs
# Default Route to normal backends
use_backend backend_ussugar if ussugar_hostname
use_backend backend_adl if adl_hostname
use_backend backend_nor if nor_hostname
use_backend backend_int if int_hostname
use_backend backend_drs if drs_hostname host_www
default_backend backend_sales
backend backend_c2c
mode http
server backend_c2c 172.16.2.11:8180 check
server backend_test 172.16.1.63:8080 check backup
backend backend_ussugar
mode http
server backend_ussugar 172.16.2.59:8080
backend backend_adl
balance roundrobin
mode http
server backend_adl 172.16.2.59:8480 check
server backend_adl1 172.16.2.160:8480 check
backend backend_nor
mode http
server backend_nor 172.16.2.59:8580
backend backend_int
mode http
server backend_int 172.16.2.59:8180
backend backend_drs
mode http
server backend_drs 172.16.2.59:8090
Here it is, more or less.
The problem we are having is that , for each application in backed we would use different subdomain, like:
acl adl_hostname hdr(host) -i adl.evaplus.com
acl nor_hostname hdr(host) -i nor.evaplus.com
acl int_hostname hdr(host) -i int.evaplus.com
Now, we are running out of free subdomains in evaplus.com domain we reserved.
That is why we want to make routing where will not use subdomain for each backend we need to reach.
I understood from documentation that it should work with
acl drs_hostname path_beg /drs
acl host_www hdr_beg(host) -i www.evaplus.com
use_backend backend_drs if host_www drs_hostname
but, something is not ok.
Thank you!