How do I access webpages hosted via MAMP on my mac from a virtual PC in Windows 7?
I recently bought a Dell running Windows 7 (and virtual XP) so that I could use it as a test PC for the websites I design and build. I'm a mac user primarily, and am finding it a real struggle to get the PC to do what I want it to do. I hope you can help! Apologies in advance if I call things by the wrong names - I definitely don't know all the right words... I have figured out how to create a number of virtual PCs on the Dell, and have installed a bunch of Microsoft's VPC Hard Disk Images for testing websites with different Internet Explorer versions on Windows XP and Windows Vista on different virtual PCs. From within IE on any of my virtual PCs I can navigate to my shared "clients" folder on my mac (which is networked to the PC) and view any web pages I want to test. This means I can test IE6, IE7 and IE8 on the same machine in a variety of OSs. Brilliant. I'm working on a website that has to be run on my mac as if it were an apache server. I use MAMP to do this, which allows me to view the pages via a localhost:8888 URL. In MAMP on my mac I have included definitions within the https-vhosts.conf file that map the pathway both to localhosts and also to the location of my website within the MAMP folder. Like this: # Localhost <VirtualHost *> DocumentRoot "/Applications/MAMP/htdocs" ServerName localhost </VirtualHost> # PWT <VirtualHost *> DocumentRoot "/Applications/MAMP/trunk/htdocs" ServerName pwt.webweavermac </VirtualHost> I have also edited the hosts file on my PC so that it points to the right place on my mac, by adding a line at the end of the hosts file like this: XXX.XXX.X.XXX pwt.webweavermac (where XXX is the IP address) Miraculously, this worked fine for IE8 on my PC (in the main part of the PC, not in a virtual PC) - using the URL http://pwt.webweavermac:8888/foldername/foldername/foldername/foldername/filename.html (where "foldername" and "filename" are my own folder and filenames) got me to the page I wanted to view. However, now I'm stuck. When I use the same URL in a browser inside any of my virtual PCs, it says it can't find the page. I checked what I think is the hosts file within the virtual pc and it already has the line at the end: XXX.XXX.X.XXX pwt.webweavermac ...but it doesn't work. To get to this hosts file I went to "my computer" within the virtual PC OS and then drilled down to the hosts file - so I think I'm in the right place! Do you think that a) I'm looking at the wrong hosts file, and what I think is the virtual PC OS hosts file is actually the main one for the PC (which would explain why it's already got my extra line of code in it) - in which case how do I get to the virtual pc hosts file so that I can change it? OR b) do I need to add another (presumably longer) bit of code to the hosts file within my virtual PCs that will show the browser how to get out of the virtual pc, into the main PC and across the network to my mac html files in MAMP? (sorry, don't know the proper words for this, but that's what I'm picturing it might have to do). I do hope someone will help, even though I'm a mac girl :) I've had to go back to my old test pc laptops to test the site in IE6 and IE7, which kind of defeats the object of the shiny new Dell sitting on my desk begging to be put to good use... TIA.
March 5th, 2010 6:55am

Hi, Since you are using virtual machines, please check the following: 1. Ensure that the virtual machines can ping the website host. 2. Check the network settings: Networking and Using Windows XP Mode Hope this helps. Thanks. Nicholas Li - MSFT
Free Windows Admin Tool Kit Click here and download it now
March 10th, 2010 12:03pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics