Accessing Mac localhost with Parallels Desktop

This post is a rough draft, images are coming.

I’m not an expert, I managed to get something that works for me, hopefully it’ll help you to but I can’t say for sure.

Current Situation

You have :

  • A Mac OSX Computer (I have Yosemite installed, doesn’t change much anyway)
  • Parallels Desktop (I have v10, don’t think it changes anything either)
  • Downloaded any IEx on Windows 7 from modern.ie for Parallels
  • A local website you access to via ‘local.mysite.com’ or similar, untested for ‘localhost:3000′ or similar

Objective

By the end of this step by step we should be able to access as ‘local.mysite.com’ from the Windows VM a website that we access to as ‘local.mysite.com’ on our Mac OSX computer.

This might work if you virtual host is called ‘localhost’ but I haven’t tested it and can’t confirm.

The names must match (which shouldn’t really be a problem I think, why would you want to make them not match anyway ?).

Step 0 – Install VM

First of all, if you haven’t done it yet, unzip the file you’ve downloaded from modern.ie and open it in Parallels.

When asked to select between “Migrated” or “Copied”, choose “Copied”.

Once Windows launches for the first time, Parallels’ Tools get installed. A popup shows up asking you to restart the computer. Don’t. Windows will restart itself when the install is complete. Not waiting for the complete install makes the VM slower and prevent installation of useful tools for Parallel’s integration with you Mac.

Let it all run, it may take like 30 minutes until Windows restarts.

Once the second start, some prompt command appears. Don’t do anything, it’s just Parallels finishing the install.

Step 1 –¬†Windows’s host files

Now we’re going to configure Windows’ host file so that ‘local.mysite.com’ redirects to our Mac on the local network.

Go to C/Windows/System32/drivers/etc and right click on the ‘host’ file and open the Proprieties.

Go on the Secrity tab. We’ll need full access to this file to edit it. Click on the Edit button with a blue and yellow shield next to it.

There, you have to select ‘Users’ in the first list, than click the ‘Full Access’ checkbox to enable open and modifications of the host file. It’s a quick and dirty trick, there might be a better way but it’s good enough for me.

Save all the updates and open up the host file in WordPad (completely down the list of applications with which to open it).

Go to the bottom of the file and add the following line :

10.211.55.2 local.mysite.com

Click the save icon at the top left of the screen.

End

Click on the IE icon at the bottom left of the screen and get started.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>