views:

728

answers:

4

I use Windows (7) OS as a development platform, running on a Mac / Parallels Desktop 5.

I would like to access the Windows localhost - from the Mac side for testing purposes.

I've found many solutions of accessing the other way around (access Mac's localhost from Windows) - but found no solution for this access direction (if any).

Any idea ? Is it possible ?

+1  A: 

This depends on how your network card is setup in the virtual machine. I don't know how it is in parallels, but in VMWare Fusion you can either set it up as "bridged" (which means sharing the same ip with the host), "NAT" which means it will have it's own private ip address and connect to the internet through the host , or "Private network" which means it will have a private IP address and will not connect to the internet. In the second and third case you can access the web server running on windows using the private ip address of the virtual machine, but in the bridge case I don't think this can be done.

matei
On Parallels , I've found two network options, Shared and Host-only.Tried them both, but I cannot accesshttp://127.0.0.1/ from the Mac.
Ranch
It's normal , 127.0.0.1 is not the ip of the virtual machine. Try going to windows, opening a cmd prompt and type ipconfig , see what ip you get, and try accessing that.
matei
http://192.168.1.100 works fine on the Windows machine (loads the IIS homepage) while is not accessible from Mac.I guess there are some settings I need to do on the Parallels app.
Ranch
also check your firewall settings on the windows machine
matei
Turned of the firewall. Still cannot access 192.168.1.100
Ranch
A: 

Sounds to me like your Parallels config is set to Host-Only networking for the Guest. Switching to Shared Networking should give your guest Windows OS a local IP address.

Then, you will have to access the Windows local IP address (not 127.0.0.1) from the Mac browser. You can find out the IP address to use by opening a command prompt in the Windows guest and taking a look at the output of the ipconfig command.

Coxy
Parallels is configured to Shared NetworkingMaybe there are other Parallels network settings ? DHCP sever is enabled. Port forwarding maybe (?)My local server IP is 192.168.1.100, Subnet Mask 255.255.255.0, Default Gateway 192.168.1.1
Ranch
A: 

I had the same problem as you Ranch. I'm running Win7 on Mac OS X (Snow Leopard) / Parallels 5. I solved my localhost problem on mac , by turning of win7 firewall and "enable" anonymous ahtentication in Authentication setting in IIS Manager.

Also I've configured in parallels; 1. Configure - hardware - Network adapter 1: Default Adapter 2. Preferences - network - connection type - shared networking

Hope this helps!

Sunshine
Hi Sunshine,Yes, that did help !Works like magic. thank you.
Ranch
A: 

[Screencast] Accessing Mac OS X localhost from Parallels]1

Hope this helps!

Mike