Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've created a new WinXP vitual machine on my win7 using VMware player. The VM is using NAT to share the host's Internet connection and when i put http://192.168.163.2/ in IE on VM, i can easily access the localhost on the win7.

It's fine to test sites for cross browser compatibility but when i'm going to test my wordpress blog on VM it doesn't load images. I think to solve the problem i need to access wordpress using http://localhost/wordpress NOT http://192.168.174.2/wordpress.

I've added an entry to the Windows hosts file, which is located at C:\Windows\system32\drivers\etc\hosts, to map the IP address to a (virtual) server name but it doesn't work:

192.168.163.2    localhost

Then i tried this and it works but still doesn't load images:

192.168.163.2    test.localhost

What should i do to solve the problem?

share|improve this question

migrated from stackoverflow.com Jul 6 '11 at 11:05

This question came from our site for professional and enthusiast programmers.

3 Answers 3

In order to access your Windows XP machine from your Windows 7 you will need to set your network adapter as Bridged once you do that your Windows XP machine is considered another device on your network.

So your IP Address would be something like 192.168.0.10 as an example, this way you can access it from your Windows 7 Machine.

share|improve this answer
    
Thanks, but i want to access the localhost on win7 from winXP. –  NL500 Jul 6 '11 at 11:19
    
Yes with the bridged network setting you can also do that –  Sandeep Bansal Jul 6 '11 at 11:27

I don't think localhost will work for this - it generally is exactly that - the local machine. For going from your XP VM to your Win7 IIS page use http://(win7machinename)/wordpress or http://(yourWin7IP)/wordpress. Note that there is lots of stuff that can get in the way here. Your Win7 IIS instance is going to treat the connection from the VM just like a connection attempt from any other outside machine so your website settings and firewall settings have to allow that connection.

share|improve this answer

Check out my post here. It is one solution that I've tried that does work - http://davemcmillan.net/382/snippets/how-to-test-a-wordpress-site-on-a-mobile-or-virtual-machine/

share|improve this answer
    
Please don't simply post a link as an answer. Try to elaborate the answer/solution here and only then post the link as credits/source. –  Lorenzo Von Matterhorn Jan 10 '13 at 16:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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