Accessing MAMP hosts from across the LAN

Guille779

macrumors newbie
Original poster
Jul 5, 2009
4
0
Hey guys,

I'm using MAMP PRO 1.8.3 and have created a few virtual hosts (project1, project2, etc.) each pointing to a different location (/Users/MyUser/Sites/Project1, and so on). Now, I can access each website locally without problems (http://project1/), but I was wondering how do I setup MAMP to be able to access these websites from across my LAN for testing purposes.

Going to http://ipaddress in the web browsers gives me the default site (localhost). I need to be able to view my websites from other computers in the network.

Thanks!
 

nuxx

macrumors member
Jun 5, 2007
80
3
Tokyo
There maybe another (easier) way to do this, but if you want to access a local site on machine A from machine B couldn't you simply configure a virtual host on machine B that points to a document root on machine A? Not sure this'll work as I've not used MAMP/MAMP Pro for a while now. I prefer XAMPP.

I have the same virtual hosts configured on every machine on my network and sync my sites folders on every machine using Chronosync. This way, I'm always accessing the document root on each individual machine.
 

Guille779

macrumors newbie
Original poster
Jul 5, 2009
4
0
Well, I've added an entry to the Windows hosts file and that seems to work:

10.0.1.10 Project1
10.0.1.10 Project2

No I can easily browse my websites from other machines. I was just hoping there was an easier way (ie, without modifying anything on those machines), but this solution will do just fine.
 

Bostonaholic

macrumors 6502
Aug 21, 2009
439
0
Columbus, Ohio
This thread has helped me a bit. I Have 3 sites I'm working on and I test them locally using MAMP. Every time I switch between sites I just changed the MAMP settings to point to that particular site. I never thought of using virtual hosts for each site.

Thanks for the help?
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,857
7
USA
Well, I've added an entry to the Windows hosts file and that seems to work:
That's the technique I use. I think the only other way would be to have some local DNS that does some pointing, but have no idea how to do that if it is possible.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.