[SOLVED] Reverse proxy : Multiple domain with same path


#1

hi all,

I have a change to do for my reverse proxy in ACL to forward to multiple domain with multiple path

i try this conf (format X time with different fqdn/path in my conf …)

acl Coll hdr_dom(host) -m dom reverseproxy.domain.com path_reg ^\/col\/[a-z]+\/RFP[/]?
acl Mon hdr_dom(host) -m dom reverseproxy.domain.com path_reg ^\/sup/[a-z]+\/RFP[/]?
use_backend MColl if Coll
use_backend MMon if Mon

Case 1: the first fqdn/path is call and go to the backend Mcoll
Case 2: the second fqdn/path is call and go to the backend Mcoll

Each backend point to different host

Thanks


#2

Try this and seems ok :slightly_smiling_face:

acl Coll_dom hdr_dom(host) -m dom reverseproxy.domain.com
acl Coll_path path_reg ^/col/[a-z]+/RFP[/]?
acl Mon_dom hdr_dom(host) -m reverseproxy.domain.com
acl Mon_path path_reg ^/sup/[a-z]+/RFP[/]?
use_backend MColl if Coll_dom Coll_path
use_backend MMon if Mon_dom Mon_path

“and” in use is inclusive :slight_smile:


#3

Best :slight_smile:

acl Domain hdr_dom(host) -m dom reverseproxy.domain.com
acl Coll path_reg ^/col/[a-z]+/RFP[/]?
acl Mon path_reg ^/sup/[a-z]+/RFP[/]?
use_backend MColl if Coll_dom Coll_path Domain
use_backend MMon if Mon_dom Mon_path Domain