1

I have a local development environment that I have setup using MAMP on OSX, on the default Apache and MySQL ports (80 and 3306).

In the hosts file I have setup custom domains for my sites, eg.

127.0.0.1    mysite.dev

I want to be able to access this site on my Windows VMs. Typically I would type in the IP address of my machine, but I need to ensure that the site is accessible from the domain alias (eg. mysite.dev) and not the IP address.

As per the instructions here, https://stackoverflow.com/questions/3326215/running-osx-mamp-test-server-on-virtualbox-windows-7, I have added the following line to my Windows hosts file…

10.0.2.2    mysite.dev

…to no avail. Any ideas?

2
  • Is your MAMP setup to accept external connections. If not it is likely only listening on the local interfact (127.0.0.1).
    – heavyd
    Commented Mar 19, 2013 at 2:13
  • How do I go about doing this? I have been able to access my localhost via the local IP address, so presumably this is configured correctly?
    – cdcdcd
    Commented Mar 19, 2013 at 7:47

1 Answer 1

-1

I've made a very simple script that you can use to assign as many .local hostnames to you computer as you like.

You can find it here: https://github.com/Richie765/mdns-listener

There's also something called dnsmasq (http://dnsmasq.org/). I've never used it myself but it could also be a possibility.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .