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

Routing after domain name

$
0
0

Hi all!
Tell me how in haproxy 2.6 you can route traffic to domain names? Given:

auth.domain.com/test/*
auth-dev.domain.com/test/*
auth-stage.domain.com/test/*

All domains have the same uri /test/* and, accordingly, need to be proxyed to different servers,
it’s clear that through path_beg, but how to make it on 3 different domains?

if i do

backend backend-front-dev
http-request replace-path /front(/)?(.) /\2
server dev-swarm-01 dev-swarm-01:3031 check maxconn 30
and
backend backend-front-stage
http-request replace-path /front(/)?(.
) /\2
server stage-swarm-01 stage-swarm-01:3031 check maxconn 30

Then the top rule backend-front-dev is applied

How to do it right?

Thanks in advance!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4746

Trending Articles



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