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

Understanding HAProxy map_reg Backend Matching Order and Default Route Behavior

$
0
0

I don’t understand how the matching order works with map_reg and base

use_backend %[base,map_reg(/usr/local/etc/haproxy/backend.map)]

This always matches backend-site

example\.com\/shop backend-shop
example\.com\/blog backend-blog
example\.com backend-site

This too

example\.com backend-site
example\.com\/shop backend-shop
example\.com\/blog backend-blog

The only solution I’ve found is

example\.com(?!\/(?:shop|blog)) backend-site

But this looks really tricky.

Am I doing something wrong? Is there a correct way to do this?

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>