Create Self-Signed Cert for nginx or Apache

From banana_wiki
Jump to: navigation, search

Create SSL private key:

openssl genrsa -aes256 -out server.key 4096

Create CSR:

openssl req -new -key server.key -out server.csr

Remove passphrase from key:

cp server.key server.key.org
openssl rsa -in server.key.org -out server.key

Sign the cert:

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt