Acesse o terminal, digite SU para obter permissão de root…
Gerando o certificado local…
cd /Applications/MAMP/conf/apache
# generate a private key (will request a password twice)
openssl genrsa -des3 -out server.key 1024
# generate certificate signing request (same password as above)
openssl req -new -key server.key -out server.csr
# Answer the questions
Country Name (2 letter code) [AU]: BR
State or Province Name (full name) [Some-State]: Rio Grande do Sul
Locality Name (eg, city) []: Pelotas
Organization Name (eg, company) [Internet Widgits Pty Ltd]: 2WAY DIGITAL SOLUTIONS
Organizational Unit Name (eg, section) []: # leave this empty
Common Name (eg, YOUR name) []: # leave this empty
Email Address []: # leave this empty
A challenge password []: # leave this empty
An optional company name []: # leave this empty
# generate the certificate
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
# remove the password from the server key
cp server.key server.tmp
openssl rsa -in server.tmp -out server.key
Editando as configurações do apache
Edite o arquivo de configuração do apache (/Applications/MAMP/conf/apache/httpd.conf), e remova o comentário da seguinte linha (próximo a linha 537).
# Secure (SSL/TLS) connections
# Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf
Habilitando as configurações HTTPS..
Edite as configurações do httpd-ssl.conf (/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf) para habilitar a porta 443 para localhost, deve ficar semelhante a isto:
DocumentRoot "/Users/Nataniel/Sites/"
ServerName localhost:443
ServerAdmin webmaster@localhost
ErrorLog "/Applications/MAMP/Library/logs/error_log"
TransferLog "/Applications/MAMP/Library/logs/access_log"