Say I have 6 web servers behind haproxy. Web servers should provide virtual hosting using apache (apache or nginex does not matter). I would like to be able to specify where the incoming HTTP requests (hitting haproxy) should go based on the virtual host. For instance
a.domain.com request should go to web1 and web2 b.domain.com request should go to web1, web2 and web3 c.domain.com request should go to web4 and web5 d.domain.com request should go to web5 and web6 e.domain.com request should go to web3, web4, web5 and web6
The idea is to have a HA, load-balanced shared hosting where users can choose on how many servers, 2 to 6 (in this case). The other important thing is that I want to load_balance sites in some servers not in all servers so I could horizontally scale to accept more customers.
Is it possible? If not do you now an alternative solution?
Google sez that defining a bunch of ACLs is the way to go, something like this:
And so on. Extend and flesh out as necessary.