Reputation: 1805
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.
We have an Apple Time Capsule/Airport router.
Firewall is turned off on my Mac.
How do I do this? Thanks.
Upvotes: 3
Views: 11165
Reputation: 161
For those who will land on this page in future and want to access their MAMP server by accessible to others on their network (by IP), add this as the very first <VirtualHost *:80>
either with the default MacOS Apache server or with MAMP (for MAMP, put it after NameVirtualHost *:80
):
<VirtualHost *:80>
DocumentRoot /path/to/web/root
</VirtualHost>
(where /path/to/web/root
= /Applications/MAMP/htdocs
for MAMP, & = /Library/WebServer/Documents
for the default MacOS Apache server)
Upvotes: 0
Reputation: 1805
Check all Apache configuration files (httpd.conf and .htaccess) to check for URL rewrites.
Turns out that my .htaccess file in my root was doing a rewrite to "localhost".
Upvotes: 2
Reputation: 56089
Upvotes: 0
Reputation: 8805
Well first see if you can connect to it yourself. From a shell try telnet localhost 80 and see if it answers. If not, it's not even listening, need to set that up first.
If that works, try telnetting from other machines on your network to yours (telnet yourmachinesiporname 80) and see if they have connectivity.
You might find your company's firewall blocks things like port 80 so you can't do things like that.
Upvotes: 0