test local websites with mamp on iphone?

2019-02-13 01:14发布

i wonder if it's possible to view my local test-environment set up with mamp on my iphone?

e.g. i'm using mamp-pro and i set up a domain http://mydomain.com which shows /htdocs/mydomain.com in my browser.

is there an easy way to view that page on my iphone as well. my iphone is in the same network - just my home network where my mac is in and my iphone is in. i pinged out the ip of my local mamp domain which is: 192.168.160.1 if i enter that one in my firefox i get a directory listing of all my htdocs folders. if my iphone is in the same network shouldn't it be possible to enter that ip as well? my mobile safari tells me that: Cannot Open Page - Safari could not open the page because the server stopped responding

am i wrong with this or is it probably just a firewall setting that doesn't allow me to view this ip on my iphone?

any idea what i'm doing wrong or any idea how i could achieve this?

thank you for your help!

found this in httpd.conf

#Listen 12.34.56.78:80
Listen 80

2条回答
Luminary・发光体
2楼-- · 2019-02-13 01:19

Did you try appending :8888 to the end of your url or local server's IP?

192.168.x.xxx:8888
查看更多
时光不老,我们不散
3楼-- · 2019-02-13 01:19

Did you check the bind interface of your Apache installation? MAMP may bind to localhost only which means that your webserver is only accessable from the machine it runs on. Check the httpd.conf somewhere in /Applications/Mamp.app/ for a line starting with "Listen".

查看更多
登录 后发表回答