How to Install an SSL Certificate on Windows MAMP PRO
Easily create a locally-trusted development certificate for MAMP PRO on Windows. Just as simple on a Mac too.
$ choco install mkcert $ mkcert -install Created a new local CA 💥 The local CA is now installed in the system trust store! ⚡️ The local CA is now installed in the Firefox trust store (requires browser restart)! 🦊
Create the Cert
Now let's make a cert for your MAMP Virtual Host. My local dev site is johnhenry.test
Choose a place for all your Certs. I keep them in a directory where my MAMP Sites live—name directory whatever you wish.
C:\Users\johnhenry\Sites\CERTS or C:\MAMP\htdocs\certs
$ cd C:\Users\johnhenry\Sites\CERTS $ mkcert johnhenry.test Created a new certificate valid for the following names 📜 - "johnhenry.test" The certificate is at "./johnhenry.test.pem" and the key at "./johnhenry.test-key.pem" ✅ It will expire on 12 April 2024 🗓 $ openssl pkey -in johnhenry.test-key.pem -out johnhenry.test.key
Inside your new certs folder, you will now have the following files johnhenry.test.key, johnhenry.test.pem and johnhenry.test-key.pem
Connect your Cert to MAMP PRO
Open up MAMP PRO Hosts settings. Next, click on your domain and then the SSL tab.
Tick to turn SSL on. For the certificate file, we will hook it up with johnhenry.test.pem. When you click Choose..., initially, you will not see the .pem file as it's looking for a .crt,.cert file. Change selection to All files (*.*) and pick the correct file.
For the Certificate key file, choose the johnhenry.test.key file. Click Save and restart your servers. When you visit your local site, you will not get any warning and will have a fully working trusted certificate.