Page 1 of 1

Virtual box localhost access

Posted: 24. Mar 2012, 14:39
by igordiy
Question on Virtual Box 4.1.8
So, i have Ubuntu 10.10 as host machine and Windows Xp as guest machine.
On host machine there is tomcat with web app running on port 8888.
When i am in guest machine i type in browser:
10.0.2.2:8888/Something.html and it works.
But my Something.html has links to javascript like src="localhost:8888/webApp/someScript.js and they obviously aren't working(because of "localhost" part).
The other problem is that i don't want to use relative path now, only absolute. Also i don't want to change localhost to Host Ip in my links.
Maybe there is some solution, like port forwarding or network config of Virtual box, that i can type in my guest browser
localhost:8888/Something.html

Thanks for any clues.

Re: Virtual box localhost access

Posted: 24. Mar 2012, 19:48
by paul_ngc
I have the same problem, only the host is mac osx 10.7.3

I found on Google people recommending to change the network adapter from NAT to Bridged.

And have you tried to edit the hosts file? I changed it but no changes unfortunately :(

Re: Virtual box localhost access

Posted: 2. Apr 2012, 21:32
by paul_ngc
Nobody knows what the problem could be? :?