How to install SSL certificate on Apache in linux

Step 1: Copy Certificate File

You will receive an email with the certificate in the email (yourdomainname.crt).

Copy yourdomainname.crt into the directory that you will be using to hold your certificates. In this example we will use /etc/ssl/. Both the public and private key files will already be in this directory. The private key used in the example will be private.key and the public key will be yourdomainname.crt. Keep the private key in /etc/ssl/private.

Step 2: Install Intermediate Certificate

You need to install the Intermediate CA certificates in order for browsers to trust your certificate. The Intermediate CA certificates are contained in a ca-bundle file that is sent to your email as a zip file (it will be

Copy file to the directory /etc/ssl.

Add the below lines to the configuration file (apache2.conf) under <Virtual Host></VirtualHost>

SSLCertificateFile /etc/ssl/yourdomainname.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
SSLCACertificateFile /etc/ssl/

Step 3: Restart Apache

sudo systemctl restart apache2

Leave a Reply

Your email address will not be published.