How to install an SSL/TLS certificate on Apache (OpenSSL)
The instructions below walk you through installing SSL on Apache with OpenSSL. If you have more than one server or device, you will need to install the certificate on each one you want to protect. If you have not generated your certificate or finished validation yet, see our CSR generation instructions before following the steps below.
What you will need
1. Your server certificate
This is the certificate the certificate authority issued for your domain. It may have been emailed to you. If not, you can download it from your account dashboard by clicking on your order.
2. Your intermediate certificates
These files let devices connecting to your server identify the issuing certificate authority. There may be more than one of them. If your certificate arrived in a ZIP folder, the intermediates — sometimes called the CA bundle — should be in there too. If not, download the right CA bundle for your certificate.
3. Your private key
This file should be on your server, or in your hands if you generated your CSR with a free generator tool. On some platforms, such as Microsoft IIS, the private key is not immediately visible to you but the server keeps track of it.
Note : the files above should be saved in the directory on your server where all certificate and key files live.
Installation instructions
1. Find the Apache config file to edit
The main config file is usually called httpd.conf or apache2.conf and lives under /etc/httpd or /etc/apache2/.
Note : the SSL configuration may be inside a <VirtualHost> block in a different file. You can always find the SSL config on a Linux distribution with this grep: grep -i -r "SSLCertificateFile" /etc/httpd/
2. Set up the file
Edit httpd.conf and add the following to your VirtualHost to enable SSL:
<VirtualHost 192.168.0.1:443>
DocumentRoot /var/www/html2
ServerName www.yourdomain.com
SSLEngine on
SSLCertificateFile /path/to/your_domain_name.crt
SSLCertificateKeyFile /path/to/your_private.key
SSLCertificateChainFile /path/to/cabundle.crt
</VirtualHost>
Note : if you need the site to load over both https and http, create a second virtual host for http. You can copy the existing config before you make these changes.
3. Test the config
Test your new configuration file by running:
apachectl configtest
4. Restart Apache
If the test passes, restart Apache with:
apachectl stop
apachectl start
Note: you may be asked for the password you set on your RSA key. If you would rather not be prompted for one, you will need to regenerate the RSA key file.
That is it — your SSL certificate is installed. To check your work, open the site in your browser at https://yourdomain.tld and look at the certificate and site information to confirm HTTPS is working properly. Remember that you may need to restart your server before the changes take effect.
To check your installation properly, use our SSL Checker. If something does not add up, get in touch and we will look at it with you.

