Here are the simple solution I did. Hope this might help you.
go to /Applications/MAMP/conf/apache/httpd.conf, and uncomment this line
# Secure (SSL/TLS) connections
Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf
Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf
go to /Applications/MAMP/conf/apache/extra/httpd-ssl.conf
change the following
DocumentRoot "/Applications/MAMP/htdocs"
#ServerName www.example.com:443
#ServerAdmin you@example.com
#ErrorLog "/Applications/MAMP/Library/logs/error_log"
#TransferLog "/Applications/MAMP/Library/logs/access_log"
SSLCertificateFile /Applications/MAMP/conf/apache/ssl/server.crt
#SSLCertificateFile "/Applications/MAMP/conf/apache/server.crt"
#SSLCertificateFile "/Applications/MAMP/conf/apache/server-dsa.crt"
SSLCertificateKeyFile /Applications/MAMP/conf/apache/ssl/server.key
#SSLCertificateKeyFile "/Applications/MAMP/conf/apache/server.key"
#SSLCertificateKeyFile "/Applications/MAMP/conf/apache/server-dsa.key"
Create a new folder /Applications/MAMP/conf/apache/ssl
navigate to the new folder
cd /Applications/MAMP/conf/apache/ssl
Create a private key, giving a password
openssl genrsa -des3 -out server.key 1024
Remove the password
cp server.key server-pw.key
openssl rsa -in server-pw.key -out server.key
Create a certificate signing request, pressing return for default values
openssl req -new -key server.key -out server.csr
Create a certificate
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Restart your MAMP server and u will able to list the path even with https://localhost
0 comments:
Post a Comment