Viewing MAMP Pro site on iPad - mamp

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?

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.

Related

How can i change PHP ini values in mamp pro for single host?

I need to develop a website for a server that has PHP short tags set to OFF
Is it possible to set this option only for one host in MAMP PRO (4)?
I believe that Mamp Pro uses one php.ini file for all sites but you may be able to work around this by enabling PHP Short Tags via your .htaccess on a site-by-site basis.

MAMP Pro running multiple hosts through to xip.io only resolving to one host

I'm using MAMP Pro v3.5 for local development. I have multiple dev sites running successfully without a problem. When it came to testing a site on my phone, I used the out of the both 'Name resolution [x] via Xip.io (LAN only)' option under the hosts tab. The first host I turned that on with was fine and worked very well (using address like www.siteone.dev.192.168.0.10.xip.io).
The problem came though when I attempted to setup a second dev site on Xip.io using the above method. Now using a different URL (using address like www.sitetwo.dev.192.168.0.10.xip.io) for the second dev site, no matter what I try, I get the first host that was setup rather than the expected second.
Is this a bug with MAMP Pro, or it's just not capable. I've tried turning off the 1st host I setup with MAMP Pro, but it still shows up as the site that is getting served under the second xip.io address I setup.
Would really appreciate one of the MAMP people to respond and confirm if this is expected behaviour. An extended Google search didn't turn up anything.
Thanks
Brendan

remove apple server app on osx 10.8

I normally develop in ruby and serve my developement site with pow.cx.
For some client work I have to work with php and drupal. I had quite a bit of set up problems and incompatibilities between apache / php / Mamp and my pow server.
I've tried to set things up as mentioned there:
https://github.com/37signals/pow/wiki/Running-Pow-with-Apache
When I leave Mamp on port 888 everything is fine, but when i want to run mamp and pow on port 80 i start to have regular problems.
To try to fix the issue I have installed Apple Server app.
I now regret it.
If i turn websites on in the server app. Server takes over my pow url.
If i turn websites off, i can't access the pow url at all (says i have to turn websites on).
If i remove the Server app completely and restart, i can access Pow again, but Mamp refuse to start apache, saying that it can't resolve the domain name set up by the Server App.
So Is there a way to remove and clean the Server app setup completely?
I'm not sure what the cleanest way to remove the Apple Server app. But at least I manage to get Mamp work again.
I had ot add an alias in my /etc/hosts files with the current name of my local machine
127.0.0.1 my-lovely-mac
and now Mamp Apache is all happy again

Connecting Coda to local Wordpress install hosted with Mamp Pro

I have been using Coda and regular version of Mamp for local development for longtime without getting into this permission mess. I recently, upgraded to Mamp Pro and setup it with VHosts. I have a site example.com with it's root path set to /Users/john/Sites/example. I have set the owner and group to www in Mamp Pro.
The moment I got all this configured I started having problems with Coda. It keeps asking me the username and password to edit the local files at /Users/john/Sites/example. I guess I have to enable FTP on my Mac and then add a site in Coda to stop it asking me to enter username password for every single file. However, I have no idea on how to get this working. I am using Lion 10.7.2
Additionally, I have setup etc/hosts file for pointing example.com to 127.0.0.1
UPDATE: Though the accepted answer by #mini does not directly answer this question. It is still an elegant solution with seamless integration with Coda.
Consider using DesktopServer instead (along with Coda 2). Unlike MAMP, you can work on template theme files directly with WYSIWYG preview, LAN share for mobile device testing (with WordPress, -not just HTML sites), enables AirPreview to work with WordPress, copy, import/export to live sites, etc. Setup is easy as it manages your vhosts, database, and project files in about three mouse clicks:
http://www.youtube.com/watch?v=Pw9-F8etBPY

iphone app private test network

I am developing an iPhone app that relies on a custom web service I created using Ruby on Rails. I want to setup a test server on my Mac without having to change the URLs that my app is pointing to - served by the RoR service. This way I can test new features or fixed bugs more easily using the test RoR server.
I have enabled internet sharing on my Mac so I can connect with my iphone to a private wifi network. I installed dnsmasq and edited my /etc/hosts file to resolve my web service URLs to the local gateway ip. However when I use my iphone app the URLs are resolved to the production server instead of my test server (my Mac).
How do I setup dnsmasq to point to the local ip.
Thanks!
Have you set the DNS server address on the iPhone to the IP address of your Mac?
After playing with it some more I was able to get it to work. I needed to edit /opt/local/etc/dnsmasq.conf and change the 'address' tag. I also had to change my Mac ethernet settings, under advance->dns I had to add 127.0.0.1 as the first dns server. This will automatically change resolv.conf which is not meant to be edited manually on a Mac.
After reading up a bit on the Dnsmasq solution, I found a nice step-by-step guide for Mac: http://davesouth.org/stories/how-to-set-up-dnsmasq-on-snow-leopard-for-local-wildcard-domains
(although personally I use Fiddler in a Windows VM for all of this sort of thing - ask if you'd like some details on that..)