Matt Langtree

Self-signed SSL Certificate on Mac OS X Lion

I needed to install a self-signed SSL Cert on my local Mac OS X Lion machine with the built-in Apache. You might consider doing this yourself if you ever want to write code that needs to utilise a secure HTTPS connection without having to deploy to a testing/live server for testing with a valid SSL certificate.

The following link helped quite a bit:

The instructions don’t directly match the Lion install, and I ended up putting my apache config options in /etc/apache2/extra/httpd-ssl.conf.

Having a bit of experience with setting up Apache and mod-rewrite previously, it didn’t take longer than 30 minutes to work out - including using my custom URL namespace:


My only suggestion is that if you are sure you’ve done everything right but you can’t get Apache to start then try typing the following command to test for syntax/startup errors.

sudo apachectl configtest