Viewing MAMP Pro site on iPad

2019-03-01 11:57发布

问题:

I've just started using the paid version of MAMP, MAMP Pro, and I'm having some trouble accessing my site via my iPad/iPhone.

I've got my MAMP server set up with the default ports (80, 3306) and am trying to visit the site on my iPad via: 10.0.1.2:80/project-name.

But no dice, what am I doing wrong?

回答1:

Use a xip.io address.

Select your host in MAMP PRO (client.dev in this example), go to the Advanced tab and put this in the Customized General Settings: ServerAlias client.*.xip.io

Set WP URLs to http://client.YOUR-LOCALHOST-IP-ADDRESS.xip.io.

For development, it's better to set a static IP DHCP address in your system preferences.

Restart everything, run!

I've answered the same a bit more in-depth in WordPress Answers.



标签: mamp