I have MAMP Pro 4 running on a Macbook Pro, with virtual hosts. It's working fine. I want to be able to access it from other devices on my local network in order to test various browser / os combinations. All the articles and posts I have found online are for earlier versions, and or don't seem to work, or require additional software, ... I know this is easy -- I had it working a few years ago, but I don't recall how I did it. Your help will be appreciated.
4 Answers
Try: http:// ip-address-of-your-MAMP-installation:8080 if it connects, fine is working.
Now the domain names. Because your are running locally and your test domains will not be resolved/routed, you need to change the "hosts" file.
Use the other Mac from where you want test.
Select "Go to Folder" and enter "/etc", there is a file called "hosts". Open it with a text editor (Wrangler,TextMate...)
Then add a line at the end:
Save it (requires the admin password).
Now enter "http:// name of the domain:8080" and it should connect you to the MAMP domain.
A more elegant way is to install a local DNS server, but that's a complete different story.
Greetings,
Peter

- 167
- 3
-
Thanks, Peter. Let me give more detail. On my Mac, http://localhost:8888/phpMyAdmin, for example, does the expected thing. However, the Mac's local net address is 10.0.1.2, and http://10.0.1.2:8888/phpMyAdmin gets a 403 (Forbidden). Even if that did work, that would be matching MAMP's idea of localhost, not any particualr virtual host. – Bennett Barouch Dec 05 '16 at 22:30
-
Hi, yes, because you didn't assign a folder. Assign a folder for "localhost", this should do it. – PeterInWiesbaden Dec 08 '16 at 18:43
-
localhost does have and has had a folder (directory) assigned to it in MAMP's console. Same for the virtual host of interest. That's not it. Hmm... Other ideas? – Bennett Barouch Dec 09 '16 at 23:37
A simple solution is to use the network name of your macbook.
You can set it in the system settings.
Let say that your macbook's network name is my-macbook
Then, to acess the served website / phpMyadmin, you can simply type my-macbook.local:8888
(assuming that Mamp serves on the port 8888
).