Installing Your SSL Certificate into Apache

The following steps will guide you in how to install your SSL Certificate into an Apache Server

Note: You must have your private key on your server.

Part 1: Preparing Your Intermediates

All SSL certificate have at least one intermediate certificate, the number of certificates varies on your certificate, Apache however can only accept 1 chain file, so we need to prepare the certificates as follows:

Log into the TrustSign Certificate Portal and navigate to your certificate.

Screen Shot 2013-03-21 at 12.28.44

Below your certificate you will see your intermediates, these will vary from certificate however the order displayed (from left to right) is important.
Download the first certificate (if you’ve got an EV certificate, this may be called an EV Cross), open it, then copy and paste it into a new text file.

Now sequentially download each Cross/Intermediate/Root certificate and paste them on the next line in your text file

Screen Shot 2013-03-21 at 12.35.00

Once you have included all certificates in your text file, save it as “ComodoIntermediateChain.crt” and upload this to your server (we usually use /www.mydomain.com).

Part 2:

From your SSL certificate portal, copy your certificate, paste it into a text file and upload it to /www.mydomain.com/www.mydomain.com.crt on your server

Now you need to locate your HTTPD.CONF file:
Tip:You can search on your server by typing find / -iname httpd.conf

Part 3: Installing Your Certificate

Once you have found your HTTPD.CONF file, you’ll need to open it up in your text editor, and look for your virtual hosts

<VirtualHost *:80>
ServerAdmin webmaster@mydomain.com
DocumentRoot /var/www/www.mydomain.com
ServerName www.mydomain.com
ServerAlias www.mydomain.com
ErrorLog /var/logs/www.mydomain.com
CustomLog /var/logs/www.mydomain.com
</VirtualHost>

Before the </VirtualHost> section, you’ll need to enter the following

SSLCertificateKeyFile /www.mydomain.com/www.mydomain.com.key
SSLCertificateFile /www.mydomain.com/www.mydomain.com.crt
SSLCertificateChainFile /www.mydomain.com/ComodoIntermediateChain.crt

Once you’ve completed these steps, simply save your HTTPD.CONF file and restart Apache.