Install free SSL certificates on AWS EC2 (using "SSL For Free") | Samir Dixit

Steps that can be used to install free SSL certificate on your AWS EC2 instance. This approach uses free certificates from sslforfree.com but is not limited to it.

Install free SSL certificates on AWS EC2 (using "SSL For Free")

Following steps can be used to install SSL certificate on an AWS EC2 instance.

  1. Install mod_ssl on your EC2 instance.
    • sudo yum install -y mod24_ssl
  2. Get SSL certificates for your domain from https://www.sslforfree.com
  3. Upload the certificate files to following directories on your EC2 instance:
    • /etc/pki/tls/private/private.key
    • /etc/pki/tls/certs/certificate.crt
    • /etc/pki/tls/certs/ca_bundle.crt
  4. Edit /etc/httpd/conf.d/ssl.conf file to use above paths.
    • SSLCertificateFile /etc/pki/tls/certs/certificate.crtSSLCertificateKeyFile /etc/pki/tls/private/private.keySSLCACertificateFile /etc/pki/tls/certs/ca_bundle.crt

Make sure that HTTPS traffic is allowed on your server.

For more details check https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-ami.html

Note:

Sometimes you might also have to add chain certificate.

In such case, please visit https://whatsmychaincert.com and test whether your server is using correct chain certificate.

If not, then you can generate the chain certificate and upload to /etc/pki/tls/certs/server-chain.crt

Make sure to edit /etc/httpd/conf.d/ssl.conf to use appropriate path of the chain certificate.