Skip to content

Instantly share code, notes, and snippets.

@svarks
Created May 31, 2012 19:28
Show Gist options
  • Save svarks/2845631 to your computer and use it in GitHub Desktop.
Save svarks/2845631 to your computer and use it in GitHub Desktop.
Self signed SSL cert
# generate super secret private key
# (not really, this key and the certificate are "throwaway" items)
openssl genrsa -des3 -out server.key 1024
# generate the self-signed certificate
openssl req -new -x509 -nodes -sha1 -days 365 -key server.key -out server.crt
# create decrypted version of key so that nginx can be started without a passphrase
openssl rsa -in server.key -out server.key.insecure
chmod 600 server.key.insecure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment