Accessing to MAMP localhost from a Windows virtual machine for testing browser compatibility

Why accessing to your Mac localhost (web server) from a Windows virtual machine? Easy! Because Internet Explorer sucks. So you could need to test your website on IE and the most reliable way is to test it on a “real” Windows installation. Here we go.


Solution 1 (the simpliest one)

  1. Start the Windows VM
  2. Open IE and enter the URL (8888 is the default Apache port in MAMP). Done! You will see your web server root, but if you navigate through the pages of a site you will notice that the links are broken, cause they are related to http://localhost:8888. So…
  3. Open the hosts file placed in C:\WINDOWS\system32\drivers\etc and add this line:    localhost
  4. This time it’s really done! Enter in IE the URL http://localhost:8888 and navigate through your sites.


Solution 2

Try this solution if the previous one doesn’t work, but I have to warning that this solution (for me) worked only sometime.

  1. Open VirtualBox > Preferences > Network > Host-only Networks tab and click the icon for adding an host-only network. This will creates a new network called, in my case, vboxnet0. Click OK.
  2. On the left VirtualBox list of VMs click on the one you’re interested then right click on it > Settings > Network and click on the first available Adapter tab.
  3. Here select these settings:
    1. Attached to: Host-only adapter
    2. Name: vboxnet0 (or the name of your new network)
  4. Click OK and launch that VM.
  5. While the Windows starting, launch the Terminal (on Mac) and enter this command:
    ifconfig vboxnet0

    You will see and IP address like inet

  6. Go back to Windows VM, open the hosts file in C:\WINDOWS\system32\drivers\etc and add this line:    localhost:8888

    Notice: on MAMP you reach the web server root on localhost:8888, replace it if you’re on another port

  7. Finally, open your most favorite browser ever (IE) and enter http://localhost:8888 (be sure to enter http:// because IE is a really beautiful but pedantic guy) and you should see your web server root.



  • NewmanOZ



Category BootstrapCategory CoffeescriptCategory DrupalCategory GravCategory HTMLCategory JavascriptCategory JoomlaCategory jQueryCategory LaravelCategory MagentoCategory PHPCategory SharePointCategory SpringCategory ThymeleafCategory WordPressCategory Workflow


Developed and designed by Netgloo
© 2019 Netgloo