Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.4: Access localhost via name from Parallels Desktop' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Access localhost via name from Parallels Desktop
Authored by: lemonaise on Apr 15, '09 02:35:57AM

I accessed my local web server by typing my Macbook's IP address in the address bar, on my Parallels browser. E.g. 192.168.0.2/site1. Using Shared Networking.



[ Reply to This | # ]
10.4: Access localhost via name from Parallels Desktop
Authored by: chrisburbridge on Dec 19, '09 07:10:47PM

I develop lots of websites on a virtual server on my Mac. I have a hosts file configured to interpret lots of different domains locally, e.g.,

127.0.0.1 mydomain.local
127.0.0.1 my-other-domain.local
etc.,
etc.,

I wanted IE within Parralels to also interpret these, but it does not recoginize localhost, or 127.0.0.1 the same.

But thanks to a few suggestions here, I figured it out.

To quote the other nice person,

"Go to System Preferences on your Mac and click the Sharing icon, then switch to the Services tab. You will see a message saying, "Other computers on your local subnet can access your computer at ..." followed by a name ending with ".local". Use this name, followed by ":3000", to access your local Rails server."

In other words, find out what your computer is called on the network. Let's say it was mymac.local

Then, I found out what IP address the virtual Windows thinks mymac.local resolves to. It gave me some other IP address.

Then, I took all of the lines in my hosts file on my Mac, and copied them into a new file, and did a search and replace on the normal localhost IP of 127.0.0.1, with that new IP.

Then, I opened up C:\WINDOWS\system32\drivers\etc\hosts, and added those lines to it.

It works. Yay!



[ Reply to This | # ]
10.4: Access localhost via name from Parallels Desktop
Authored by: chrisburbridge on Dec 20, '09 12:23:33PM

Important pre-step (also from the above other contributions):

You must first install Bonjour for Windows (http://support.apple.com/downloads/Bonjour_for_Windows) from within the Windows instance.



[ Reply to This | # ]