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 184.108.40.206 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?
Configure the host OS in /etc/hosts to map ubuntu.server to 220.127.116.11 On the guest OS we have the trouble. It accepts the request for 18.104.22.168 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?