SSL Installation on AWS EC2

SSL Installation on AWS EC2 is an easy process. There are many ways to add the SSL Certification in Amazon AWS EC2. Here we have shown the process of Installing the third party SSL Certificate on AWS Linux EC2 Apache Server.
 
The following are the steps to install SSL on Amazon AWS EC2

Enable MOD SSL

To Enable the mod SSL Run the following commands

 cd /etc/ssl/
 sudo a2enmod ssl

Move the certificate files to Amazon server

Change the certificate folder permission in AWS. To change the folder permission Run the following Command.

 sudo chmod -R 777 certs/

We need to move the Private Key, Certificate, Fullchain files to Server. The following are the sample SCP commands to move those files from local to AWS EC2 Server.

 sudo scp -i /home/dell/saran/mytypings.pem /home/dell/Downloads/private_key.key ubuntu@ec2-00-000-000-00.compute-1.amazonaws.com:/etc/ssl/certs
 sudo scp -i /home/dell/saran/mytypings.pem /home/dell/Downloads/certificate.cer ubuntu@ec2-00-000-000-00.compute-1.amazonaws.com:/etc/ssl/certs
 sudo scp -i /home/dell/saran/mytypings.pem /home/dell/Downloads/fullchain.CER ubuntu@ec2-00-000-000-00.compute-1.amazonaws.com:/etc/ssl/certs

Update in AWS EC2 SSL conf file

Open the following file

 sudo vim /etc/apache2/sites-available/default-ssl.conf

Change the SSL file path location in that file. The following is one sample

 SSLCertificateFile /etc/ssl/certs/private_key.key
 SSLCertificateKeyFile /etc/ssl/certs/certificate.cer
 SSLCertificateChainFile /etc/ssl/certs/fullchain.CER

Set default SSL conf file for Configuring

To set this default SSL conf file for Configuring run the following Commands.

 sudo a2ensite default-ssl
 sudo service apache2 restart

Sarav Author

Leave a Reply

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