Launch OSX MAMP Test Server on VirtualBox Windows 7

I have a MAMP server and several test sites installed on my OSX 10.6.3. I just installed Windows 7 on a VirtualBox virtual machine. I was able to successfully share folders with a Windows installation, but I wonder if I can run my MAMP sites on Windows without having to install another local host.

Does anyone know if this is possible? It would be very convenient if I could test my sites on both operating systems located in one place.

+7
windows-7 virtual-machine virtualbox localhost macos
source share
3 answers

Although it is probably too late for the OP, posting here for others.

If you are just trying to access your Mac localhost , then all you need to do is enter os 10.0.2.2 into the guest.

If you are trying to access named virtual hosts, such as 0.dev or dev.local , you need to modify the os host host file to match the domain names with the os host.

For Windows 7, just go to C:\Windows\System32\drivers\etc , then modify the hosts with admin privs.

Inside you will see the following line:

 # 127.0.0.1 localhost 

Under it, add entries for each of the virtual hosts that you want to use

 10.0.2.2 maclocalhost 10.0.2.2 0.dev 10.0.2.2 dev.local 
+23
source share

I just installed three VirtualBox virtual machines today specifically for connecting to MAMP on an OS X host. Thought Id shares my method of doing this, since it works well for me.

When accessing localhost through 10.0.2.2 I find using host only network a more flexible and reliable way to handle scripts. You get a different IP address, so debugging network problems in a virtual machine may also work.

First go to VirtualBox Preferences… Then select Host-only Networks . You must have a vboxnet0 adapter. If not, add it.

enter image description here

Once you are tuned in, select the vboxnet0 adapter and click on the small yellow screwdriver icon on the right side of this window to edit the settings. In the Adapter set the IPv4 address to 192.168.56.1 and the network mask to 255.255.255.0 . Leave the IPv6 field blank. The IPv6 netmask must be 0 .

enter image description here

The contents of the DHCP server must be empty, for example.

enter image description here

Good? Got this set. Now select your virtual machine. In my example, this image is IE8 - Win7 for testing web development. And click the Settings button. Then click the Network icon. Now select Adapter 2 . And select Host-only Adapter in the drop-down menu for Attached to: And then select vboxnet0 in the Name: section. The remaining parameters should be standard.

enter image description here

Now that you are starting your Windows virtual machine, launch Internet Explorer. And go to the address:

 http://192.168.56.1 

With this you must be installed! But if you're used to using a Mac, make sure you have http:// in front of the address. I was embarrassingly stuck when I just went into direct 192.168.56.1 .

And as Jon Jaques in your answer, you can edit the hosts on Windows to point to the IP address 192.168.56.1 . This will simplify your life, and if you know how to set up virtual hosts in MAMP (not difficult), you can set up several different sites for testing through VirtualBox.

Oh, also, if you are used to using your computer name in OS X to connect to MAMP-like with the name LogicArtist.local , if this is the name of your computer - you're out of luck. VirtualBox, built into the software router, claims to be transmitting multicast data, but it is not. Check out this post which explains it in more detail.

There are several network adapters in the environment created by VirtualBox that claim to be multicast. However, they are lying. Moreover, due to the way VirtualBox assigns metrics, your outgoing socket will be transferred to the liar, who will happily gobble up your multicast messages and not send them.

Annoying, but you can get around such things by at least editing your hosts to have an entry for LogicArtist.local as follows:

 192.168.56.1 LogicArtist.local 

Definitely not as elegant as the true multicast address being transmitted, but at least the short amount of time you spend on Windows for debugging will be simpler by adding this entry.

+3
source share

MAMP Pro allows you to specify a port for each host. Select a unique port for the desired host. In your virtual machine, just enter http://10.0.2.2:PORTNUMBER and your site will appear. Example: I created a node called localuproar and assigned it a port number of 9000. In VirtualBox, I opened Internet Explorer and typed http://10.0.2.2:9000 , and my site appeared.

You can talk to host files as described in previous posts, but I think it’s easier to just enter the port number.

In the corresponding note, there is a very simple way to create virtual machines for all versions of Internet Explorer ( http://osxdaily.com/2011/09/04/internet-explorer-for-mac-ie7-ie8-ie-9-free/ ):

enter image description hereenter image description here

+2
source share

All Articles