Skip to content

Instantly share code, notes, and snippets.

@postspectacular
Created April 9, 2014 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save postspectacular/10312313 to your computer and use it in GitHub Desktop.
Save postspectacular/10312313 to your computer and use it in GitHub Desktop.
Setup selfsigned SSL cert for nginx
# https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-nginx-for-ubuntu-12-04
sudo openssl genrsa -des3 -out new.key 1024
sudo openssl req -new -key new.key -out new.csr
sudo cp new.key new.key.orig
sudo openssl rsa -in new.key.orig -out new.key
sudo openssl x509 -req -days 1095 -in new.csr -signkey new.key -out new.crt
sudo service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment