Multiple web-sites behind a single IP

In order to install multiple web-sites with the same IP, the web-sites have to be identified by DNS name. Secondly, one will want to have a different installation of apache for each of the individual web-sites.

I configured a set-up where I have a single forwarding proxy, and all different vm’s with individual web-services. With Apache 2.2, the config is as follows.

The firewall has a public ip, and is forwarding all requests on port 80 and port 443 to the private proxy. The proxy server has a private ip (e.g. 10.0.1.10) and is forwarding all requests to individual servers. I will present 2, but you can repeat as much as you want. The private servers are on 10.0.1.21 and up….

Activate your proxy includes by creating a symbolic link:
su root
cd /etc/apache2/mods-enabled
ln -s ../mods-available/proxy.load proxy.load
ln -s ../mods-available/proxy_http.load proxy_http.load

Edit /etc/apache2/httpd.conf and add following sections:
UseCanonicalName On
NameVirtualHost 10.0.1.10

<virtualhost 10.0.1.10>
ServerName webmail.mydomain.com
ServerAlias www.webmail.mydomain.com
ProxyPreserveHost On
ProxyPass / http://10.0.1.21/
ProxyPassReverse / http://10.0.1.21/
</virtualhost>

<virtualhost 10.0.1.10>
ServerName clientzone.mydomain.com
ServerAlias www.clientzone.mydomain.com
ProxyPreserveHost On
ProxyPass / http://10.0.1.22/
ProxyPassReverse / http://10.0.1.22/
</virtualhost>

… that is it… simple once you know but it took me a lot of time to find it out.

Alternatives to ESX(i) on Mac OS X

VMWare ESX(i) does not support Mac OS X. The hardware does not match, and the license is in conflict.

VMWare has a solution for Mac OS X that is compatible with ESX VMs under the name of Fusion. However, this is a client application and the headless mode has been disabled in its latest release. It means one has to start a client-session and in there start the server…. As such, for running a server, VMWare has no viable solution.

Leaves us with investigating other alternatives.

  • Installing ESX on a Mac PRO.
  • Installing VirtualBOX headless.
  • Installing Parallels headless.

For running Virtual BOX headless, we will need to set Virtual BOX in the launchd (yes, Mac OS X has no init.d), and figure out how to get it working on different versions. 10.4, 10.5, 10.6 seem to be slightly different.
Secondly, we will need to get RDP connections to these VMs.
Thirdle, we will need to convert back and forward machines from ESX and/or Parallels into Virtual BOX.

A good article for furhter reading.