Let's say there is a host OS (Mac OS X) and a virtual machine running Ubuntu as guest OS. The guest OS has the IP and some virtual hosts, e.g. ubuntu.server

So, how to really map a request to the virtual host ubuntu.server on the guest OS?

I tried:

  1. Configure the host OS in /etc/hosts to map ubuntu.server to
  2. On the guest OS we have the trouble. It accepts the request for which is not ubuntu.server and therefor the ubuntu.server virtual host will never be requested. Just the localhost on the guest OS.

It might surely be possible to simply then use But this would only work for one host per guest OS.

Any idea? Or is there a bug in my train of thoughts?