MAMP free with SSL support for Apache on Mac (2025)

If you want to install a free version of MAMP application stack with a proper SSL support for Apache web server on your Mac computer without a good tutorial, you may have to arm yourself with a good amount of headache pills. With my little experience in working on a Mac computer, just solving this rebus got me smiling – I would bet that getting the HTTPS to work for the Apache in MAMP PRO version is a lot more easier task (a MAMP’s way to make a more money). But oh, what the hell… let’s get straight to the solution that really WORKS.

Installing MAMP free on a Mac computer

This is the easiest task. You just need to follow a few simple straightforward steps:

  1. Visit the https://www.mamp.info/en/mac/ website and click on the green Download button.
  2. Unzip and run the MAMP Downloader app. Go through the standard installation process up until the moment the MAMP has finished installing.
  3. When the installation has been finished, move the installer to trash as it will be no longer needed.
  4. Now go to the Launchpad and open up the MAMP application.
  5. Click on Preferences and choose the General tab. Here choose the PHP-Cache as OPcache (default is off). You will need the OPCache for better PHP performance.
  6. Next navigate to the Ports tab in the Preferences window. Change the Apache Port to 80 (default is 8888) and Nginx Port to 9899 (random free port. default one is same as for Apache: 8888). This is a very crucial step as you will probably do not want to use custom ports when accessing your local development environments for websites. Also there might be conflicts when using the port 8888 as default one. Hit the OK button afterwards.
  7. Press the Start button to check if the MAMP is working.

With all of these steps done, the MAMP welcome page should automatically open up in the browser. The url should be exact or similar to this one:

If so far you didn’t have any problems with executing the steps and everything went as expected, let’s get to the fun part.

Getting the SSL to work in the free version of MAMP

First thing you may notice when trying to open https://localhost in your browser is a nice “This site can’t be reached” page with a browser error code: ERR_CONNECTION_REFUSED. This is just as expected.

The SSL version is not working, because of multiple following reasons:

  1. the settings file which enables and configures the SSL has not been included in the httpd.conf file;
  2. the socache module (necessary for SSL session cache) has not been loaded in the httpd.conf file;
  3. there are no default server certificates generated;
  4. the default document root specified in the SSL configuration file is invalid;

To enable and configure the SSL for Apache in MAMP, please carefully follow the next set of instructions below.

Load socache (shmcb) module and include SSL settings in the Apache httpd.conf file

  1. Open the Finder and navigate to Applications -> MAMP folder.
  2. Open the /Applications/MAMP/conf/apache/httpd.conf file and uncomment the following two lines:
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

#Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf

These are found in different locations of the httpd.conf file, so for convinience – use search to locate them quickly.

3. Save the httpd.conf file (Command + S keys), we’ll return to it later.

Important sidenote: A proper way of debbuging the Apache runtime errors…

Now if you’ve done the previous steps – when you try to Start the MAMP stack via its graphical interface, you should get a nice error message which, as per the best practices, does not explain anything at all.

Apache couldn’t be started. Please check your MAMP installation and configuration.

This is what I call “taking an advantage of guys who do not know how to do the things in the Terminal” or just another way of getting you in thinking “if you do not know how to do it yourself – buy it!”.

To understand better what is happening “under the hood” of this message, you should open the Terminal app (use Command + Space to open the Spotlight search – type in terminal and hit enter) and type in the command below. This is for starting the Apache via terminal, which will reveal all of the runtime errors its encountering:

/Applications/MAMP/Library/bin/apachectl start

In my case the errors were the following:

So in short terms – a warning about non-existant document root and missing default SSL certificate. You can always use this method via Terminal to get the insights about what exactly is not working. Such messages will not be logged in any log files.

Fixing the default document root for the “https” version

This is probably one of the easiest things to fix, yet, quite important if you want to use the default “localhost” domain via SSL protocol for web development purposes (e.g. https://localhost). In the default MAMP/Apache configuration file for SSL (httpd-ssl.conf), there is an incorrect Document Root specified which we need to fix (along with a few other file paths). To do that, follow the steps below.

  1. Open the Finder and navigate to Applications -> MAMP folder.
  2. Open the /Applications/MAMP/conf/apache/extra/httpd-ssl.conf file for editing
  3. Replace the DocumentRoot, ErrorLog and TransferLog directives under the <VirtualHost _default_:443> section with the following:
DocumentRoot "/Applications/MAMP/htdocs"
ErrorLog "/Applications/MAMP/logs/apache_ssl_error_log"
TransferLog "/Applications/MAMP/logs/apache_ssl_access_log"

Generating the default SSL certificate for the server

You will basically need to generate two files – server.key and server.crt. Open the Terminal app and follow the instructions below. If you get “access denied” errors when executing commands in the Terminal – just add a sudo in front of the command (to execute it as a super user).

1. Navigate to the root directory

cd ~

2. Generate a private key. It will ask you for a password – type in a simple one which you can remember (I used: doinwp) as we’ll use it only temporarily – it will be removed in the later steps. Note that the password will be asked twice – enter both times the same one.

openssl genrsa -des3 -out server.key 1024

3. Generate a certificate signing request. You will have to enter the password you just created.

openssl req -new -key server.key -out server.csr

4. Fill in the dummy data according to the given template (for local environments you do not need to add real information here).

5. Last step of CSR generation – it will ask you to enter “A challenge password []:“. Leave this empty and just press ENTER.

6. Generate the certificate. Once again – you will have to enter the password you specified earlier.

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

7. Remove the password from the server key by executing the two following commands. Again – enter the password you specified earlier when asked.

cp server.key server.tmp

openssl rsa -in server.tmp -out server.key

8. Move the certificate files into your MAMP Apache configuration folder by executing the two following commands.

cp server.crt /Applications/MAMP/conf/apache

cp server.key /Applications/MAMP/conf/apache

Try launching the MAMP…

If you did all of the steps in a linear way and correctly, you should be able to Start the application stack via the MAMP graphical user interface.

You will still get a certificate warnings in the browser when attempting to connect to https://localhost/ as the SSL certificate you configured is self-signed one however these warnings can be easily bypassed with a few clicks in the browser.

In case you use Google Chrome as your internet browser – click on Proceed to localhost (unsafe) to skip the SSL certificate warning. If you see the default “Welcome” page under https://localhost/ – similar to the one in the picture below – congratulations you have successfully configured and launched MAMP free version with SSL / HTTPS support!

Virtual Hosts (vhosts) with MAMP and Apache

If you want to develop multiple websites with MAMP stack and Apache by using different locally configured domains for each, this may be the next thing you would like to pay attention on.

The default right-out-of-the-box Apache configuration file in the MAMP stack does not have the virtual hosts file included, so the first and most proper step in this case is to include it which can be done in this way:

  1. Open the Finder and navigate to Applications -> MAMP folder.
  2. Open the /Applications/MAMP/conf/apache/httpd.conf file and uncomment the following line:
#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

For quicker adding of directive blocks to your Apache virtual hosts file you can copy and edit the following template:

### HTTP version of myjuicyapplestore.local (http://myjuicyapplestore.local) ###
<VirtualHost myjuicyapplestore.local:80>
    DocumentRoot "/Applications/MAMP/www/myjuicyapplestore.local"
    ServerName myjuicyapplestore.local
    <Directory "/Applications/MAMP/www/myjuicyapplestore.local">
        Require all granted
        AllowOverride All
    </Directory>
</VirtualHost>

### HTTPS version of myjuicyapplestore.local (https://myjuicyapplestore.local) ###
<VirtualHost myjuicyapplestore.local:443>
    DocumentRoot "/Applications/MAMP/www/myjuicyapplestore.local"
    ServerName myjuicyapplestore.local
    SSLEngine On
    SSLCertificateFile "/Applications/MAMP/conf/apache/server.crt"
    SSLCertificateKeyFile "/Applications/MAMP/conf/apache/server.key"
    <Directory "/Applications/MAMP/www/myjuicyapplestore.local">
        Require all granted
        AllowOverride All
    </Directory>
</VirtualHost>

Remember to add the domains you will use for your locally hosted websites to the system HOSTS file. Also note that you will need to restart the MAMP application stack (or the Apache server) in order for the changes to come into effect after editing the virtual hosts file.

References

  1. How to get MAMP to work with SSL … Yes really. – https://gist.github.com/jfloff/5138826
  2. Apache 2.4 configuration for ssl not workinghttps://stackoverflow.com/questions/20127138/apache-2-4-configuration-for-ssl-not-working
  3. Why won’t Apache Server start in MAMP?https://stackoverflow.com/questions/28252124/why-wont-apache-server-start-in-mamp

Leave a Comment on MAMP free with SSL support for Apache on Mac (2025)
About the author
I'm a full-stack WordPress developer with a 10+ years of solid experience in the core web development languages, development processes / techniques, web security, Linux server management and with pretty good understanding about proper semantics, UX/UI, technical SEO, good design and basic knowledge of company leadership. On top of that - a distant 5+ years experience as a computer and electronics repair technician which often enables me to understand also how the things work at the hardware level.
Your feedback matters!…
I hope you found this article helpful. Feel free to add some comments - your feedback is very important to me, as it drives my motivation and helps me to improve the content.