TransferLog “/Applications/MAMP/Library/logs/access_log” Under the VirtualHost setting, you should see the following settings: # General setup for the virtual host Make sure that Listen is set to 443, like this: Listen 443 Make sure that this line is also uncommented. Next, search for Include /Applications/MAMP/conf/apache/extra/nf If you do find it, make sure that it is uncommented, meaning that there is no #(hash) in front of it. In newer installations of MAMP, this module is included in the default setup and you won’t find it in the file, if this is the case, you can just carry on. Open the nf file and search for: LoadModule ssl_module modules/mod_ssl.so It would be wise to make a backup of your files before making any changes. Next, we need to create a private key for the certificate by entering: openssl req -new -sha256 -nodes -out server.csr -newkey rsa:2048 -keyout server.key -config /MAMP/conf/apache/nf Next up, we want to generate a root certificate that will be valid for 1024 days: openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem Next, paste the following line into the terminal which will generate a RSA private key: openssl genrsa -des3 -out ~/ssl/rootCA.key 2048 Well done so far, you can check to see if the file are there by typing ls, which will list the contents of the ssl folder. You can also use a shortcut to save and quit by typing :wq and pressing enter. vi v3.extĪdd the following info: authorityKeyIdentifier=keyid,issuer basicConstraints=CA:FALSE keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment subjectAltName = DNS.1 = localhost To save the file, type esc to exit edit mode, then type :x then enter, to save the file and :q then enter, to quit and exit the file. In order to edit the file type i, this will put the document into edit mode and you will be able to add info to it, add the following info: Ĭhange to your actual email address. From your terminal type: mkdir sslĬhange directory to the newly created ssl folder: cd sslĬreate a file called : vi It doesn’t have to be called ssl, but it makes sense.
In order to generate your SSL certificate, create a folder in your user folder(home directory) on your mac called ssl. You can identify a website that is secured with an SSL certificate by having a look if the website has a padlock next to its’ name in the browser address bar.
This has become an extremely important tool to have when uploading your website to the World Wide Web and browsers now inform people if the site they are visiting has a valid certificate or not. It aids in the protection of information so that it cannot be intercepted by malicious software. It serves encrypted data over the https protocol. It is used to safeguards personal information that is submitted through forms on a website to a web server. What is an SSL Certificate?Īn SSL certificate encrypts information that is sent back and forth from the web browser to the server.
There are other server distributions for other operating systems such as WAMP for Windows and LAMP for Linux, but this tutorial will be focusing on the Apple Macintosh Operating System(OS). It is an all in one solution in order to get a local development server up and running on your computer. MAMP is an acronym for Macintosh, Apache, MySQL and PHP.
In order to install SSL on MAMP, there are three main steps.