

- MAMP PRO 4 BASIC INSTRUCTIONS HOW TO
- MAMP PRO 4 BASIC INSTRUCTIONS SOFTWARE
- MAMP PRO 4 BASIC INSTRUCTIONS WINDOWS
This error was happening because the ‘DocumentRoot’ was defined twice, in both nf and nf. Once that error was resolved the SSL certificate was working but all requests resulted in a 404 error.

This will show all instances of ‘listen’ in the MAMP configuration directory. You can find possible duplicates by running the following command in the Terminal: This can be fixed by removing the ‘Listen 443’ line from nf. This happens when there are multiple ‘Listen 443’ lines defined. What this means is that apache cannot start because port 443 is already in use. First we got the following error: could not bind to address :443. That’s it! You should now have a local development environment with SSL! Troubleshooting issues after updating MAMPĪfter updating MAMP to version 4.4.1. You can copy the server.crt and server.key file to another directory if you’d like but be sure to define the right path in nf. key file to the SSLCertificateKeyFile directive. crt file you have generated earlier after SSLCertificateFile.Īdd the location of the. MAMP might put both DocumentRoots together, resulting in it looking for /Applications/MAMP/htdocs/Applications/MAMP/htdocs, which fails.įinally, specify the SSLCertificateFile and SSLCertificateKeyFile directives. If you see 404 errors on but the site works fine on try commenting out the DocumentRoot line (by placing a # in front of it). Note: The DocumentRoot might not be necessary anymore from MAMP 4.4.1. Finally, the SSLEngine needs to be set to on. The ServerName should be changed to localhost:443. First, the VirtualHost should be set to *:443, instead of _default_:443. # Enable/Disable SSL for this virtual host.Ī couple of things need to be changed in this configuration. TransferLog “/Applications/MAMP/Library/logs/access_log” Openssl req -new -sha256 -nodes -out server.csr -newkey rsa: 2048 -keyout server.key -config ĭocumentRoot “/Applications/MAMP/Library/htdocs”ĮrrorLog “/Applications/MAMP/Library/logs/error_log” Openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pemĪfterwards, we can create the private key for the certificate (server.key): Next, we will generate the root certificate which will be valid for 1024 days: Openssl genrsa -des3 -out ~/ssl/rootCA.key 2048 Next, paste the following line which will generate a RSA private key: Which will show all files in the ~/ssl/ directory. You can verify the files are in the directory by typing KeyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment You can change these attributes to reflect those of your own organization:įollowed by an enter.

Next up, create a file named by using your text editor of choice, in this case, I’m using viĪnd copy the following information (for more information about what each field after does, refer to this guide by Oracle). We now need to enter that directory by typing: This will create a directory called ssl in your root folder. Open up a terminal and type the following: The following steps need to be taken to create a certificate with SAN for localhost: Generating the certificate This does involve some messing around with the command line but is not too hard to do.
MAMP PRO 4 BASIC INSTRUCTIONS HOW TO
Getting a certificate with the right properties can be a daunting task, but luckily Alexander Zeitler has written a guide on how to generate a certificate with a Subject Alternative Name. Since Chrome 58, certificates for use on localhost need to have a SAN, Subject Alternative Name. Generating a self-signed certificate for local use
MAMP PRO 4 BASIC INSTRUCTIONS SOFTWARE
It combines free software such as Apache, NGINX, and MySQL and is the software of choice here at Really Simple SSL headquarters.
MAMP PRO 4 BASIC INSTRUCTIONS WINDOWS
MAMP is a one-click solution for macOS and Windows for setting up a local development environment. The instructions are based on macOS Sierra 10.12.5, using MAMP (Apache) and Chrome 59. This guide will walk you through all the necessary steps to get a working certificate on localhost. If you do development on your own machine, then deploy to production, and you have an SSL certificate on your site, it is useful to have SSL on your localhost environment.
