How to Install a SSL Cert for a Sub Domain on Bitnami AWS

This is how yo can install a secure SSL (HTTPS) certificate for your sub domain name which can be used for adding a secure shop on your website. I’m deploying on Amazon Web Services (AWS) using a bitnami AMI image so these instructions will be useful if your using this setup. The service I have chosen to use is provided by Comodo (via namecheap) you can get an SSL certificate for only $9 per year and their support was really good (as you will see from screenshots below).

SSL Setup Instructions

buy cert from here: $9 per year

log into your server and generate a CSR

#create private key
sudo /opt/bitnami/common/bin/openssl genrsa -out /opt/bitnami/apache2/conf/server.key 2048

#create CSR
sudo /opt/bitnami/common/bin/openssl req -new -key /opt/bitnami/apache2/conf/server.key -out /opt/bitnami/apache2/conf/cert.csr

SSL cert for a sub domain

Copy your CSR

#copy out your CSR to send off for a certificate
cat /opt/bitnami/apache2/conf/cert.csr

Go to here and click activate


now you need to authenticate domain
– enter company details etc…

DNS validation

certificate details

Add the CNAME (i use cloudflare because its awesome but this can be added just as easily to godaddy or whoever hosts your domain name)

DCV methods


Download your certs from the email should be a bundle and crt files.

upload these to the /opt/bitnami/apache2/conf/ folder (name them server.)

sudo /opt/bitnami/ restart

when you start the server you might see this error.
sudo error

and in the error log:
sudo error 2

Hi, I’m getting this error from my SSL cert “server certificate does NOT include an ID which matches the server name”. I think it might be because my server is 52.6.126.xx but this is loaded from the A record How can I solve this?

sudo update-ca-certificates
sudo certificates

So you need to include the ca-bundle.crt from here:

More instructions:

Then upload the following to your server:

Then add these lines to your bitnami.conf file:
SSLCertificateFile “/opt/bitnami/apache2/conf/shop.domain.crt”
SSLCertificateKeyFile “/opt/bitnami/apache2/conf/server.key”
SSLCACertificateFile “/opt/bitnami/apache2/conf/COMODO_DV_SHA-256_bundle.crt”

ssl cert file

ssl cert

Add the trust secure icon to your web page

trust secure icon


Thats it how you have setup SSL on your shop sub domain name and are protected with website warranty.

Sam Deering

Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *