defaults log global mode http option httplog timeout connect 5s timeout client 30s timeout server 30s frontend fe_http bind :80 acl host_app req.hdr(host) -i app.example.com www.app.example.com acl host_api req.hdr(host) -i api.example.com use_backend be_app if host_app use_backend be_api if host_api default_backend be_default backend be_app mode http balance roundrobin server app1 10.0.20.11:8080 check server app2 10.0.20.12:8080 check backend be_api mode http balance roundrobin server api1 10.0.20.21:8080 check backend be_default mode http server fallback1 10.0.20.31:8080 check