1

I've got a MacBook running MAMP.

I want others on my team (who are on the same network) to be able to access my local webserver so they can test their client code against my RESTful API's on my server.

JMan
  • 121

1 Answers1

1

Just make sure you have apache listening on your local IP address or on all addresses assigned to your laptop.

It should already be setup by default to do this. Just give your coworkers your IP Address and they should be good to go.

Kyle
  • 121
  • 1
    as in: <VirtualHost *:80> where * is present or <VirtualHost [Your actual IP]:80>. Right now, it is likely that you're binding the httpd instance to 127.0.0.1 (localhost), and/or you simply have your software firewall on. – brandeded Oct 31 '11 at 20:58
  • Accessing "localhost" from my browser works fine. But when I tried to access 192.168.15.12 (my Mac's IP address) with my iPhone, I got an error msg that Safari couldn't connect to the server. And when I tried to telnet to my IP address from my Mac, the error msg say "connection refused.. unable to connect to remote host." I tried accessing 192.168.15.12 from another Mac on network, but got an error msg it couldn't connect to localhost. I don't have a firewall running on my Mac. Why can't my iPhone connect to my MAMP server? – JMan Oct 31 '11 at 23:32
  • Localhost is an alias for an ip address, 127.0.0.1 (usually). This basically means "self". There are a few things, when you bind the web server to port 80 of local host, the process hooks into that port and is sitting there waiting to service connections. If there is a firewall, this can stop connections. If you are binding to 127.0.0.1, then you will only service connections from internal things, like hitting http://localhost on Mac.. – brandeded Nov 01 '11 at 12:45
  • . What you need to do is... do what I said in the comment (where I expand on what Kyle was stating above). This will bind the Apache process to service connections on the given port :80. Also, check to make sure your firewall is allowing connections on TCP port 80. – brandeded Nov 01 '11 at 12:47