I have a one arm haproxy with single IPv4 addderss as VIP.
- clients browsing VIP:80 are forwarded to a real server 1
- clients browsing VIP:81 are forwarded to a real server 2
What I would like to do is:
- if the client browses a “server1.domain.com” it is redirected to VIP:80
- if the client browses a “server2.domain.com” it is redirected to VIP:81
And from there the LB forwards the traffic to the appropriate real server.
Knowing that the DNS resolves both “server1.domain.com” and “server2.domain.com” to a single VIP address of the LB.
How can I perform this?
Any hint?