I have a Ubuntu 12.04 system running VirtualBox. I installed Windows XP as a VM and it is working perfectly. I configured file sharing which works fine. I can also type the IP of my host machine into Internet Explorer on the VM and Apache on my host machine serves up a response with the default "It Works" default page.
By default when I type my IP address into the browser like: http://10.10.10.10, the host Apache server will use /var/www for serving requests. If I type: http://10.10.10.10/dev it will get /var/www/dev which is what I would expect it to do.
Now for the tricky part that I can't find a solution. What I'm trying to be able to do is instead of typing: http://10.10.10.10/dev/mysite/httpdocs/ I can just type http://mysite.dev and it will route just like a vhost. I currently have a vhost setup like that in my Ubuntu host machine and it works fine from a browser in the host, but not in the guest OS (Windows XP). If I type the vhost URL in the VM/Guest browser, it will just return the default at /var/www/.
[Added Info] I need this functionality so I can test web applications in IE. The applications typically use relative links for resources and URL rewriting which won't resolve correctly with a full file path, and instead need a domain name root. Any help would be appreciated.
HOST OS (Ubuntu 12.04)
- /etc/apache2/sites-enabled/webapp.dev: http://pastebin.com/dtfXmM4i
- /etc/hosts: http://pastebin.com/8G3ULbGs
- .htaccess: http://pastebin.com/u3iNbJsK
GUEST OS (Windows XP)
- Windows XP Hosts File: http://pastebin.com/H91wyZkM