I just wanted to post some quick instructions on creating a self signed certificate that you can install into Apache 2 for use with mod_ssl. It seems that these instructions are hard to come by, and I thought it would be useful to just show how to do it without the messy explanations:
mkdir ~/sslcert cd ~/sslcert openssl genrsa -des3 -out server.key 1024 openssl req -new -key server.key -out server.csr openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
server.key and server.crt are now your private key and self-signed public certificate pair. If you install them into Apache2, you’ll notice that you’re now prompted for your certificate password everytime you start the server. This is because your private key is stored in an encrypted format for security. It’s recommended that you leave it this way, but if you really hate that password prompt starting apache, here’s how you can decrypt your private key file:
cd ~/sslcert cp server.key server.key.orig openssl rsa -in server.key.orig -out server.key
Comments
Pingback: Installing Apache2 and SVN on OS X using Fink | Zero Byte, LLC