Skip to content

Instantly share code, notes, and snippets.

@pierot
Created August 8, 2012 09:12
Show Gist options
  • Save pierot/3293684 to your computer and use it in GitHub Desktop.
Save pierot/3293684 to your computer and use it in GitHub Desktop.
ssl on apache on osx
# Generate private key
openssl genrsa -des3 -out server.key 1024
# Generating the CSR (certificate signing request):
openssl req -new -key server.key -out server.csr
# Generating the self signed certificate:
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
# Configuring SSL in httpd.conf for Apache:
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /path/to/generated/server.crt
SSLCertificateKeyFile /path/to/generated/server.key
</VirtualHost>
# Avoid Apache asking for passphrase
cp server.key server.key.copy
openssl rsa -in server.key.copy -out server.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment