Yesterday I needed to test a local copy of my client's site with SSL enabled. I'm running the site locally on a Macbook Air using MAMP Pro 2.0.5. There didn't appear to be any online instructions for enabling SSL in MAMP Pro, at least not in 2.0.5.
The user interface for MAMP Pro makes SSL options available, including an "SSL" checkbox on the "General" tab of the default host "localhost", and a dedicated "SSL" tab for each host, but this is all disabled for "localhost".
After experiencing a few roadblocks, including MAMP Pro locking up every time I loaded it, which I corrected by deleting the settings file in ~/library/Application Support/appsolute/MAMP PRO/settings.plist , I finally came up with a set of steps that work.
- Add a new host.
- Give the host a name (not "localhost")
- Set the port to 443 (make sure that you have set the Apache SSL port to 443 on Server > General
- Check the "SSL" checkbox
- Select the "SSL" tab for your new host and create a "Self signed certificate"
- Choose the key and certificate that you have created and "Apply" the changes
You can setup another host with the same name, and aliases if you have added any, but you * must * explicitly set the port on the non-SSL host to 80. I was never successful at getting SSL on the "localhost" host, even after setting the ports appropriately for both "localhost" instances I had in my list.