How to talk to a virtual host on a guest OS?

Posted by Bernd on Server Fault See other posts from Server Fault or by Bernd
Published on 2010-01-05T12:49:55Z Indexed on 2010/04/28 12:04 UTC
Read the original article Hit count: 364

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:

Configure the host OS in /etc/hosts to map ubuntu.server to 192.186.56.101 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?

© Server Fault or respective owner

Related posts about virtual-hosts

Related posts about virtual-machine