Isaac Zepeda
Isaac Zepeda

Reputation: 300

Access virtual host from a local virtual machine

I have a virtualhost called project so in my localhost I access http://project and everything is ok, the webserver is in Apache 2.2 in Ubuntu 11.04. Then I need to test this project on Safari and IE, I have a Virtual Machine with Windows XP in the same computer (using VirtualBox).

How can I access to my virtualhost from the virtual machine? I've tried http://project from IE in the virtual machine and it didn't work. I could try http://192.168.1.20/project (my local ip) it work but I really need to access with the virtualhost name (http://project) because a lot of code and rewrite rules only work when I use http://project

Thanks

Upvotes: 3

Views: 2687

Answers (1)

Joachim Isaksson
Joachim Isaksson

Reputation: 180917

As an administrator, edit C:\Windows\System32\drivers\etc\hosts on your XP virtual machine and add the line;

192.168.1.20 project

After that, you should be able to access it by host name.

Upvotes: 4

Related Questions