HAPROXY per domain redirection
Posted
by
SecondThought
on Server Fault
See other posts from Server Fault
or by SecondThought
Published on 2012-11-19T06:46:43Z
Indexed on
2012/11/19
11:11 UTC
Read the original article
Hit count: 267
I'm trying to redirect requests to my load balancer by domain name with acl and hdr_dom, to a separate backend. The redirection works ok with the first request - 'GET /' (the destination server is a WordPress site) but when the client asks for the assets ('GET /blablabla/style.css' for example) the haproxy doesn't redirect it to the right backend anymore, but to the default one, with .
In the haproxy log I can see the correct host that the request is for (the one that I defined in hdr_dom) but it's like that since the GET request itself is relative (I mean not containing the domain but only from the /blablabla and forth), haproxy doesn't recognize it with the hdr_dom. I'm just guessing here.. Please help...
© Server Fault or respective owner