I am running Ubuntu 11.04, I have setup my localhost so I access my sites at


By setting up virtual hosts and adding entries to my hosts file.

I want to test them in IE so I have installed VirtualBox with Windows.

My question is, How can I access site1.local from the virtual machine?

1 Answer 1


Ah, It's as easy as pie.

In your windows Virtual Machine edit your hosts file


And link your virtual hosts to, If you are just using localhost then replace localhost with localhost

So my hosts file looks like localhost site1.local site2.local

  • The networking mode is NAT. I've seen other articles suggest different methods using bridged.
    – manafire
    Nov 15, 2012 at 16:31
  • This worked for me, using Microsoft's IE images, it gave me a file permission message when I tried to save the host file changes in notebook. If that happens, just right click the notepad program and run as administrator, then open the hosts file within that, that made it work.
    – Brad
    Jul 22, 2013 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.