-
cd ~/.ssl
-
Generate new .key and .crt file
# SEE: https://github.com/webpack/webpack-dev-server/issues/854#issuecomment-292445914
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout scsheltierescue.dev.key \
-new \
-out scsheltierescue.dev.crt \
-subj /CN=scsheltierescue.dev \
-reqexts SAN \
-extensions SAN \
-config <(cat /System/Library/OpenSSL/openssl.cnf \
<(printf '[SAN]\nsubjectAltName=DNS:scsheltierescue.dev')) \
-sha256 \
-days 3650
- Copy newly generated .key and .crt to MAMP directory
cp scsheltierescue.dev.{crt,key} /Applications/MAMP/conf/apache
-
Open
/Applications/MAMP/conf/apache/httpd.conf
and uncommentInclude /Applications/MAMP/conf/apache/extra/httpd-ssl.conf
-
Open
/Applications/MAMP/conf/apache/extra/httpd-ssl.conf
and edit the following keys within the<VirtualHost...>
tag
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile "/Applications/MAMP/conf/apache/scsheltierescue.dev.crt"
SSLCertificateKeyFile "/Applications/MAMP/conf/apache/scsheltierescue.dev.key"
</VirtualHost>
- Hit Command (⌘) + Spacebar and type
Keychain Access
to open the Keychain Access App - Import your
~/.ssl/scsheltierescue.dev.crt
file - Right click it and select "Get Info". Then click "Trust" and set "When using this certificate" to "Always Trust."
- Restart Chrome and Restart MAMP
- Navigate to
https://scsheltierescue.dev/
orhttps://localhost
and it should work