Aug 29, 2017

We are going to use openssl to generate a certificate with subject alternative names. When we use SANs in a certificate we can use the same certificate to front several websites with different domain names.

First we need to generate a private key. Since we are going to use this in a web server like Nginx or apache I'm not going to encrypt the private key with a passphrase.

openssl genrsa -out thilina.org.key 2048

Then we need to have a configurations file to add those alternative names into the certificate signing request (CSR).