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

Map wildcard domain to backend via map

$
0
0

Hello,

In my current setup I have a backends.map file mapping fqdn to backend name:

backends.map file:
somehost.somedomain.com back-someservice

Frontend use_backend line:
use_backend %[req.hdr(host),lower,map_dom(/etc/haproxy/backends.map)]

Now I’d like to map a wildcard domain to a backend such that:

hosta.somedomain.com -> back-servicea
hostb.somedomain.com -> back-servicea
hostc.somedomain.com -> back-servicea

I don’t want to specify each line individually, I’d rather use a regex or wildcard to do this. For example:

backends.map file:
*.somedomain.com back-servicea

Tried doing this with the way I have the current use_backend line setup and that does not seem to work. Anyone know how this can be accomplished?

Thanks,
Paul

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



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