Hi, When use_backend is choosed, the evaluation of other use_backend conditions stops. Your configuration just miss a test like this:
acl test_path path,map_beg(/etc/haproxy/path2backends.map) -m bool true use_backend bk_%[path,map_beg(/etc/haproxy/path2backends.map)] if test_path use_backend bk_%[req.hdr(host),lower,map(/etc/haproxy/host2backends.map,stats)] Thierry On Wed, 16 Mar 2016 23:32:34 +0100 Michael Rennecke <[email protected]> wrote: > Hello, > > is it possible use use_backend rules with map files multiple times in > one frontend? My small example don't work. HAProxy returns 503, if no > match in the first map file. it would be great, if HAProxy can continue > the processing of the request. > > Regards, > Michael > > global > log /dev/log local0 > log /dev/log local1 notice > > > defaults > mode http > timeout connect 5s > timeout client 15s > timeout server 15s > > > frontend http-in > bind :8080 > > use_backend bk_%[path,map_beg(/etc/haproxy/path2backends.map)] > use_backend > bk_%[req.hdr(host),lower,map(/etc/haproxy/host2backends.map,stats)] > > > backend bk_stats > stats enable > stats show-legends > stats realm Haproxy\ Statistics > stats uri / > stats refresh 30s > > > backend bk_host1 > server a1 127.0.0.1:9001 > > > backend bk_host2 > server a2 127.0.0.1:9002 > > > backend bk_path1 > server a3 127.0.0.1:9003 > > > backend bk_path2 > server a4 127.0.0.1:9004 > --

