Skip to content

Instantly share code, notes, and snippets.

@do3cc
Created April 18, 2014 12: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 do3cc/11041989 to your computer and use it in GitHub Desktop.
Save do3cc/11041989 to your computer and use it in GitHub Desktop.
Simple way to generate ssl certs without interactive questions
# When having multiple vhosts, and one of them listens to https,
# nginx will answer ssl requests for all of your vhosts, but with data
# from that one host that answers ssl. The browser will complain
# that the certificate is for the wrong site and you will receive
# the wrong site.
# With this simple self signed certificate, the user gets a warning
# for the untrusted certificate but at least gets the right site.
openssl req -x509 -newkey rsa:2048 -keyout lala.key -out lala.crt -days 3650 -nodes -subj "/C=de/CN=www.example.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment