8

Mapping URL params to servers dynamically in haproxy

view full story
linux-howto

http://serverfault.com – I want to use haproxy to map incoming URLs to different back-ends based on URL parts in a wildcard style for example a request to http://x.com/a/<anything> would be proxied (not redirected) to http://<anything>.x.com/. I can do it for statically named path components like this: frontend xyz 192.168.1.1:80 acl is_z path_beg /a/z use_backend z if is_z default_backend cluster backend z reqrep .* / server z z.x.com But I'd need to repeat such clauses for every variation in the named param I want to handle; I'm looking to do the mapping dynamically. I can match (HowTos)