Pengő Dzsó
Pengő Dzsó

Reputation: 865

Virtualbox access a port on host's localhost from guest as localhost (guest->host port forward)

The situation is that I try to test a webpage in IE8 (Win 7 guest OS), and for some reason I have many "http://localhost:8000" url used in development environment used in js ajax, so I cannot access my host's server through the ip. So what I want to do is that when I say http://localhost:8000 in guest's browser, it should forward the request to host's local port 8000. Any idea?

Upvotes: 4

Views: 3220

Answers (1)

Bert
Bert

Reputation: 143

You should edit %systemroot%\system32\drivers\etc\hosts file. Set localhost to point to the IP address of your host machine.

For example:

192.168.0.10    localhost

Cheers!

Upvotes: 2

Related Questions