OpenVZ Forum


Home » General » Support » Virtual hosting
Virtual hosting [message #3450] Mon, 29 May 2006 18:33 Go to next message
dmaggian is currently offline  dmaggian
Messages: 2
Registered: May 2006
Junior Member
Is is possible to use Apache's virtual hosting on openvz based servers? In a normal dedicated server you can point multiple domain names at the same ip address and use apache's virtual host to respond to each incomming connection appropriately.

With openvz you can have multiple Apache web servers running, each running on their own vps. In theory, each of these web servers could also run name based virtual hosting assuming that their was some way to route the web requests to the appropriate VPS.

Is this possible. Can anyone point me some documentation on how to set it up?
Re: Virtual hosting [message #3456 is a reply to message #3450] Tue, 30 May 2006 02:43 Go to previous messageGo to next message
dlzinc
Messages: 34
Registered: March 2006
Member
Not too sure if I'm misunderstanding what you want to do...

Each apache in each individual VPS can do name based virtual hosting.

So let's say you set up in DNS...
mydomain1.com and mydomain2.com = 4.3.2.55
mydomain3.com and mydomain4.com = 4.3.2.56

Apache in VPS1 has the IP 4.3.2.55 and name based vhosting set up for mydomain1.com and mydomain2.com
Apache in VPS2 has the IP 4.3.2.56 and name based vhosting set up for mydomain3.com and mydomain4.com

That would work properly as is. The Apache config in each VPS would be the same as if it was running on a dedicated server instead of a VPS. If you wanted to use only 1 IP address for all the VPSes, I'd imagine you'd have to do some sort of proxying and assign private IPs to the VPSes.
Re: Virtual hosting [message #3467 is a reply to message #3456] Tue, 30 May 2006 14:28 Go to previous messageGo to next message
dmaggian is currently offline  dmaggian
Messages: 2
Registered: May 2006
Junior Member
Thanks for the reply. I realize now that the original post was probably not clear enough. I don't think there would be any issue for us if we had a public IP address for each virtual server but what we are really looking for is to have a single public IP for the physical server with each server having a private IP address and somehow routing the appropriate web requests to the appropriate virtual server.
Re: Virtual hosting [message #3472 is a reply to message #3467] Tue, 30 May 2006 14:35 Go to previous message
dlzinc
Messages: 34
Registered: March 2006
Member
I see.

In that case, you'd want a reverse proxy that can do something like this:

http://www.apsis.ch/pound/

Unfortunately that does mean you'll have to manually maintain the mappings (which host is on which VPS), though I suppose you could write a script to scan each VPS' httpd.conf and related files for virtualhost entries and update the proxy server's config file accordingly. I believe the commercial implementation of OpenVZ (Virtuozzo) can do it all automagically.
Previous Topic: Unable to apply patch 025stab014 on Debian Etch (testing) 2.6.15-k8-smp
Next Topic: Dependence libreadline.so.5
Goto Forum:
  


Current Time: Sat Nov 02 09:43:19 GMT 2024

Total time taken to generate the page: 0.03252 seconds