How to Install an SSL Certificate in Linux

In this article, we will show you how to install an SSL certificate on Linux (RHEL) Apache server. In the final section, we will give you useful tips on where to buy the best SSL certificate for Red Hat Linux.


Table of Contents

  1. Generate the CSR on Linux.
  2. Install an SSL certificate in Linux.

Generate the CSR on Linux

If you’ve already generated the CSR, you can skip the next section.

The Certificate Signing Request, or simply CSR, is a small text file containing information about your domain ownership and/or company. Generating CSR is an integral part of the SSL buying process. All commercial Certificate Authorities require SSL applicants to complete this step.

You have two options:

  1. Generate the CSR automatically using our CSR Generator.
  2. Follow our step-by-step tutorial on how to create the CSR on Linux.

Install an SSL certificate on Linux

Your Certificate Authority will provide the necessary installation files via email. You need to download the zip folder and extract its contents to your server/desktop.

Follow the steps below to complete the Linux SSL installation:

Step 1: Create the yourdomain.crt file

Open your primary SSL certificate file with a text editor of your choice and copy the entire content including the Begin Certificate and End Certificate tags, and paste it into a new file. Name it yourdomain.crt.

Step 2: Copy yourdomain.crt on your server

Copy the yourdomain.crt file into your server directory where you’ll store the SSL certificates. For example, /yourdomain/httpd/conf/ssl.crt/

Therefore, you should store your certificate files in the following locations:

  • /yourdomain/httpd/conf/ssl.crt/ – You need to store all the certificates here.
  • /yourdomain/httpd/conf/ssl.key/ – You need to store the private keys here.
  • /yourdomain/httpd/conf/ca-bundle/ – All the bundle files should go here.

Step 3: Install your SSL certificate

In the Virtual Host settings for your site, in the httpd.conf file, you will need to add the following:

  • Copy the PEM formatted Bundled CA file onto the directory location of all your CA-Bundle files. Example, /etc/httpd/conf/ssl.crt/.
  • Open your httpd.conf file with any text editor.
  • Add the following line to the SSL section of the httpd.conf: SSLCACertificateFile /yourdomain/httpd/conf/ssl.crt/ca-chain-pem.txt

The updated SSL section of httpd.conf file should look like the example below:

  • SSLCertificateFile /yourdomain/httpd/conf/ssl.crt/server.crt
  • SSLCertificateKeyFile /yourdomain/httpd/conf/ssl.key/server.key
  • SSLCACertificateFile / yourdomain /httpd/conf/ssl.crt/ca-chain-pem.txt

Step 4: Save the httpd.conf file and restart your Apache server

Congrats, you’ve successfully installed your SSL certificate in Linux.

You can use one of these excellent SSL tools to check the status of your installation. The instant scans will discover any potential errors and vulnerabilities that may affect the certificate’s performance.

Save 10% on SSL Certificates when ordering today!

Fast issuance, strong encryption, 99.99% browser trust, dedicated support, and 25-day money-back guarantee. Coupon code: SAVE10

Written by

Experienced content writer specializing in SSL Certificates. Transforming intricate cybersecurity topics into clear, engaging content. Contribute to improving digital security through impactful narratives.