Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

munch2112

macrumors member
Original poster
Oct 13, 2011
57
0
Devon, UK
Hey,

I've done a little searching but not found anything that seemed to help me, so thought I would stick a little thread up!

Im sure what I'm trying to do is very simple...

What I would like to do is host a website in Parallels and be able to view it on my Mac in Safari.

I know that there will be a change to the hosts file, but i tried just adding in the 127.0.0.1 but it didn't seem to work. Im assuming because the mac hosts is looking at the mac files, not the windows files.

Is this possible at all?!

Thanks in advance

Adam

FYI, im using a Retina Macbook, Parallels 7, Windows 7 home Premium.
 

D.T.

macrumors G4
Sep 15, 2011
11,050
12,460
Vilano Beach, FL
You can absolutely do this, in fact, I'm doing it right now :)

I have a Windows 7 VM, that's running IIS7, has Oracle 11g and MS SQL, and I access the web server from Safari on the Mac.

When you create a VM, it's not going to be 127.0.0.1 that's the localhost of your Mac. The VM is going to have an internal IP allocated, and you can access the website on that IP, make sure the Network Configuration is set for shared network (which is handy for sharing resources between the VM and OSX too).

You're right on with the /etc/hosts file in OSX, you just need to the correct IP, then you can add it and a name reference (I use things like http://www.domain and api.domain leaving off the TLD, for development).

Over on your Win 7 VM, run from a cmd prompt: IPCONFIG and you'll see the allocated IP.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.