Skip to content

Instantly share code, notes, and snippets.

@nitincoded
Created April 11, 2016 14:19
Show Gist options
  • Save nitincoded/bc2d55da68d0977298435c95715b7282 to your computer and use it in GitHub Desktop.
Save nitincoded/bc2d55da68d0977298435c95715b7282 to your computer and use it in GitHub Desktop.
OpenSSL command for generating certificates for Apache
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout privkey -out cert
#req -x509 is to generate X509 certificate
#nodes is for no passphrase
#days is for validity to expiry
#newkey is for generating new key instead of using existing key
#Enable the SSL mod, enable the default-ssl site, modify the default-ssl.conf to set the SSLCertificateFile and SSLCertificateKeyFile
#Apache generates a warning telling us that it's a self-signed certificate; ignore the warning :-P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment