Skip to content

Instantly share code, notes, and snippets.

@jalex19100
Last active April 26, 2016 19:11
Show Gist options
  • Save jalex19100/3020c6a55241cbdb8a9e5b588d890bff to your computer and use it in GitHub Desktop.
Save jalex19100/3020c6a55241cbdb8a9e5b588d890bff to your computer and use it in GitHub Desktop.
OpenSSL SSL cert creation for localhost intranet development
openssl genrsa -out server.key -passout pass:test 1024
openssl req -new -subj "/CN=localhost" -key server.key -out server.csr
openssl x509 -req -days 36500 -in server.csr -signkey server.key -out server.crt
## Lines needed in the Apache configuration to enable SSL (probably in a <VirtualHost *:443> tag):
# SSLEngine on
# SSLProtocol all -SSLv2
# SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA
# SSLCertificateFile /keylocation/server.crt
# SSLCertificateKeyFile /keylocation/server.key
## MAC OS X add to trusted certs
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain server.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment