On 10/07/2015 10:32 μμ, Phillip Decker wrote: > Hello again, > > I was migrating a setup from the older style acl-based host to backend > mapping, to the newer > map-based approach, e.g. > > use_backend %[req.hdr(host),lower,map_beg(mapping.conf,default)] > > and that works fine. But now I'm tempted to simply name the backends after > each servername, > (eg. 'mail' from mail.google.com <http://mail.google.com>, or 'maps' from > maps.google.com > <http://maps.google.com>). > > Which in my imagination would look something like: > > use_backend %[req.hdr_beg(host),lower] > > But is there a way to substring or regex off the front of the host string, > and pass that to the > use_backend call? > > In other words, continuing the google.com <http://google.com> example, if > people are hitting > the server with "host: mail.google.com <http://mail.google.com>", and > maps.google.com > <http://maps.google.com>, and just for completeness, notes.books.google.com > <http://notes.books.google.com>, I'd like to have backends: > > backend mail > mode http > foo > .... > > backend maps > mode http > bar > ... > > backend notes.books > mode http > baz > .. > > Is there a way to accomplish this without building them into a mapped file in > 1.5.x? > > (1.6 solutions are okay too, but won't be able to move to that until it's in > stable.)
1.6 is *stable*. It has been running fine in several setups I manage since dev6:-) But, I guess you meant in *stable* repo of X distribution, right? Cheers, Pavlos
signature.asc
Description: OpenPGP digital signature