I want to have a haproxy in front of some iis servers.
My problem is that on the iis servers I have three applications.
app1.domain.com
app2.domain.com
app3.domain.com
On the frontend. I do not want to show the sub domains.
So I want do write:
www.domain.com/app1
www.domain.com/app2
www.domain.com/app3
And on the backend I want to change both the host and url to match each application.
I have an idea how to rewrite all this, but that will require to duplicate all real servers in multiple backed parts on the haproxy.
So my question is: Can I rewrite URL and Hosts before choosing a backend? Or can one backend do multiple rewrites based on some conditions?