views:

23

answers:

0

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 192.186.56.101 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 192.186.56.101
  2. On the guest OS we have the trouble. It accepts the request for 192.186.56.101 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 192.168.56.101. But this would only work for one host per guest OS.

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