yes, it was pretty easy in the end:
I used pound (http://www.apsis.ch/pound/) on the main node: it will accept the connection and based on a list of rules, redirect it to the VM of your choice.
so each VM is set with Apache listening on Port 80 like usual and Pound will match domain names and redirect.
a couple caveats:
- It doesn't seem to work with HTTPS (but it could be my mistake)
- Apache log options have to be changed if you want to log IPs; otherwise you'll only get the ip from the host node.
This is an example:
ListenHTTP
Address your.host.ip.address
Port 80
xHTTP 2
# mydomain1.com
Service
HeadRequire "Host:.*mydomain1.com.*"
BackEnd
Address my.virtualmachine1.ip.address
Port 80
End
End
# mydomain2.com
Service
HeadRequire "Host:.*mydomain2.com.*"
BackEnd
Address my.virtualmachine2.ip.address
Port 80
End
End
End
[Updated on: Tue, 20 May 2008 00:10]
Report message to a moderator