How To Install An SSL Certificate On Apache & mod_ssl

Third party SSL can be trusted in most of browsers and it can be installed on multiple servers. Once you got certificate file from SSL provider, it needs to be installed and it follows certain process depending on server type. In this article, we would like to describe installation process of SSL certificate on Apache Server. You can rely upon like Symantec, RapidSSL, Thawte, Comodo, and GeoTrust like many certificate authorities. We have taken GeoTrust SSL certificate for instance in this article.

Get-Free-SSL-Certificate-For-Website-With-Start-SSL1

First, extract zip file received from certificate authority and make two files named domainname.crt and domainname.ca-bundle. Private Key should be created along with the CSR and it should be on server.

After that move, both files to ssl.crt directory found to be in /etc/ssl/ directory. Move private key to the ssl.key directory found to be in /etc/ssl/ directory.

Second, find SSL configuration files (generally httpd.conf or apache2.conf) and edit these files with notepad++.

For Apache configuration files, it can be found as follows:

  • Fedora/CentOS/RHEL: /etc/httpd/conf/httpd.conf
  • Debian and Debian based: /etc/apache2/apache2.conf

For SSL configuration files, they are like

  • httpd-ssl.conf
  • ssl.conf
  • In the /etc/apache2/sites-enabled/ directory

Third, in Virtual Host section of the file, add below directories:

  • SSLEngine on
  • SSLCertificateKeyFile /etc/ssl/ssl.key/server.key
  • SSLCertificateFile /etc/ssl/ssl.crt/yourDomainName.crt
  • SSLCertificateChainFile /etc/ssl/ssl.crt/yourDomainName.ca-bundle ***

There are two versions like

For Apache 1.3.x:

SSLEngine on
SSLCertificateKeyFile /etc/ssl/ssl.key/server.key
SSLCertificateFile /etc/ssl/ssl.crt/yourDomainName.crt
SSLCACertificateFile /etc/ssl/ssl.crt/yourDomainName.ca-bundle

For Apache 2.x:

SSLEngine on
SSLCertificateKeyFile /etc/ssl/ssl.key/server.key
SSLCertificateFile /etc/ssl/ssl.crt/yourDomainName.crt
SSLCertificateChainFile /etc/ssl/ssl.crt/yourDomainName.ca-bundle

Finally, Save your config file and restart the Apache service.

SSL Checker: Once you have installed SSL on Apache, you can check it via SSL checker that will show details of the certificate like SSL algorithm, server, key size, serial number, expiry of certificate and issuer.