notes for Setting up mamp with ssl (with chrome working):
in mamp -> preferences -> change port to 80 (set web & mysql to 80 button) then in terminal as user run this long line: openssl req \ -newkey rsa:2048 \ -x509 \ -nodes \ -keyout server.key \ -new \ -out server.crt \ -subj /CN=localhost \ -reqexts SAN \ -extensions SAN \ -config <(cat /System/Library/OpenSSL/openssl.cnf \ <(printf '[SAN]\nsubjectAltName=DNS:localhost')) \ -sha256 \ -days 3650 cp server.crt /Applications/MAMP/conf/apache cp server.key /Applications/MAMP/conf/apache /Applications/MAMP/conf/apache/httpd.conf -> uncomment line: Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf /Applications/MAMP/conf/apache/extra/httpd-ssl.conf <VirtualHost *:443> SSLEngine on SSLCertificateFile /Applications/MAMP/conf/apache/server.crt SSLCertificateKeyFile /Applications/MAMP/conf/apache/server.key </VirtualHost> open keychain -> system -> file -> import /Applications/MAMP/conf/apache/server.crt then find localhost file in keychain -> right click -> info -> trust -> always trust
remove annoying MAMP admin message
give sudo permissions to mamp
login in terminal as admin sudo visudo -> add this: USERNAME ALL=(ALL) NOPASSWD: /Applications/MAMP/bin/startApache.sh USERNAME ALL=(ALL) NOPASSWD: /Applications/MAMP/bin/stop.sh
mampstart.sh
#! /bin/bash sudo /Applications/MAMP/bin/startApache.sh & /Applications/MAMP/bin/startMysql.sh & exit 0
src
https://serverfault.com/questions/845766/generating-a-self-signed-cert-with-openssl-that-works-in-chrome-58 https://gist.github.com/jfloff/5138826 https://teamtreehouse.com/community/mamp-y-u-always-ask https://stackoverflow.com/questions/207786/stop-password-prompt-on-mamp-startup