Skip to content

Instantly share code, notes, and snippets.

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