Accessing MAMP hosts from across the LAN

Discussion in 'Web Design and Development' started by Guille779, Dec 10, 2009.

  1. Guille779 macrumors newbie

    Joined:
    Jul 5, 2009
    #1
    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!
     
  2. nuxx macrumors member

    nuxx

    Joined:
    Jun 5, 2007
    Location:
    Tokyo
    #2
    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.
     
  3. Guille779 thread starter macrumors newbie

    Joined:
    Jul 5, 2009
    #3
    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.
     
  4. Bostonaholic macrumors 6502

    Bostonaholic

    Joined:
    Aug 21, 2009
    Location:
    Columbus, Ohio
    #4
    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?
     
  5. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #5
    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.
     
  6. rowsdower macrumors 6502

    Joined:
    Jun 2, 2009
    #6

Share This Page