Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from serverfault.com Oct 31 '11 at 22:59

This question came from our site for professional system and network administrators.

1 Answer 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.

share|improve this answer
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. –  mbrownnyc 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 localhost on Mac.. –  mbrownnyc Nov 1 '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. –  mbrownnyc Nov 1 '11 at 12:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.