Virtual box localhost access
Posted: 24. Mar 2012, 14:39
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.
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.