OpenVZ Forum


Home » General » Support » domain names / virtual machines
Re: domain names / virtual machines [message #30282 is a reply to message #25683] Tue, 20 May 2008 00:06 Go to previous message
Thomasd is currently offline  Thomasd
Messages: 39
Registered: December 2007
Member
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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Setting up a HN-based firewall
Next Topic: Need help with different subnets for VE's
Goto Forum:
  


Current Time: Sun Sep 15 04:54:21 GMT 2024

Total time taken to generate the page: 0.03543 seconds