global
log 127.0.0.1 local0
maxconn 2000
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats
defaults
log global
option dontlognull
option redispatch
retries 3
timeout connect 5000s
timeout client 1200000s
timeout server 1200000s
frontend http_proxy
mode http
bind *:443 ssl crt /etc/ssl/cert_for_a.pem crt /etc/ssl/cert_for_b.pem
option httplog
option http-server-close
acl a_domain_url hdr_beg(host) a.domain.com
use_backend bk_Lo if { path_beg /lo }
acl work_url hdr_beg(host) b.domain.com
use_backend bk_Lp if { path_beg /lp }
backend bk_Lo
mode http
server lo a.b.c.d:5000
backend bk_Lp
mode http
server lo a.b.c.d:5500