I installed a fresh TurnKey LAMP VM (Ubuntu, Apache2, PHP 5.2, the usual) in VirtualBox (latest). I configured networking so it has an IP of
192.168.1.111 on the bridged network. Then I logged into Webmin from the host machine at
http://192.168.1.111/--worked fine. In Webmin I set up an Apache2 virtual host with the
foo.local and set up a PHP app in the configured directory. Then I added the line
127.0.1.1 foo.local to
Now back in my host machine--Windows 7--I edited my
C:/windows/system32/drivers/etc/hosts file and added the line
192.168.1.111 foo.local. Now, from Windows I can
ssh email@example.com just fine, and when I
lynx http://foo.local/ from the VM it loads home page of the virtual host perfectly, and the app works perfectly.
But when I open a browser on the Windows host and navigate to
http://foo.local/ I get unexpected results: In IE8 (not my browser of choice, for the record) when I hit
http://foo.local/ it takes me to the VM's Webmin home page, i.e. the same thing as if I went to
http://192.168.1.111/ on the host machine. In Chrome, however, I just get redirected to
http://localhost/--i.e. Windows' localhost, which doesn't have a web server configured, so error.
Can anybody help me resolve this? I've tried every combination of configurations on both the host and in the VM that I can think of and it's driving me batty. Thanks in advance.