HAProxy - map files and directory selection

Started by zwck, February 07, 2020, 02:17:32 PM

Previous topic - Next topic
Hey Frankie :D

As far as i can determine the backend selection currently functions with

use_backend %[req.hdr(host),lower,map_dom(/tmp/haproxy/mapfiles/mapfile.txt,bk_defaultbackend)] 

with a mapfile.txt containing something like this:

sub.domain.tld bk_subdomain

when navigating to sub.domain.tld the properbackend will be selected. however i would like to be able to forward directories e.g
sub.domain.tld/dir bk_subdomaindir
which does not work with map.dom in the usebackend code. How would i go about this ?