Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4715

HAproxy > mapfile backendselection with directory

$
0
0

@makara1 wrote:

Hey Guys, quite new here and also quite the beginner. I would like to match a domain and directory with my map file and i am wondering how to do this the best way.

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

use_backend %[req.hdr(host),lower,map_dom(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_otherbackend

which does not work with map_dom in the usebackend code. How would i go about this ? and how would i rewrite this line?

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

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>