This quick, three-part guide explains how to manually install an SSL Certificate on a Debian server. The first two sections cover essential configuration aspects, while the latter portion offer SSL buying recommendations.

Table of Contents

  1. How to generate CSR for a Debian Server?
  2. Install an SSL Certificate on Debian
  3. Where to buy an SSL Certificate for a Debian server?

How to generate CSR for a Debian server?

Before installation, your first task is to generate a CSR (Certificate Signing Request) code. This is the standard procedure when applying for an SSL Certificate. The CSR contains relevant details about your domain and organization which the Certificate Authority must verify before issuing you the certificate.

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 Debian.

Now, you can copy-paste the entire CSR content into a text editor, and send it to the CA during your order process. Depending on your SSL method, you should receive the SSL certificate within minutes, or in the next couple of days.

Install an SSL Certificate on a Debian server

Step 1: Save the certificates to the Debian server

Once your SSL certificate has landed in your inbox, download the root certificate and intermediate certificate files, and save them to the Debian server, in a particular directory

Step 2: Find and open the Apache .config file

Now, you have to locate and edit the Apache .config file. It usually resides in the /etc/apache2/sites-enabled/your_site_name directory.

If it’s not there, find it via the sudo a2ensite your_site_name command

Pick a text editor of your choice and open the Apache .config file

Note: To connect to your site through both HTTP and HTTPS, you need to create two separate files in the sites-enabled directory. The HTTP file will use port 80 to establish the connection, while the HTTPS one will perform the same action via port 443.

Step 3: Edit the Virtual Host block

In the .config file, find the Virtual Host block. You need to edit it to make your website available only via the HTTPS.

By default, the Virtual Host block looks like this:

<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /path/to/yourdomain.crt
SSLCertificateKeyFile /path/to/yourdomain.key
SSLCertificateChainFile /path/to/

You will adjust it to your own SSL certificate details:

  • SSLCertificateFile – provide the location (on your server) of your SSL certificate
  • SSLCertificateKeyFile – specify the location (on your server) of the private key file (you created the private key file along with the CSR code)
  • SSLCertificateChainFile – enter the location (on your server) of your intermediate certificate/ca-bundle file.
    Note 1: In the unlikely event that the SSLCertificateFile command doesn’t work, try SSLCACertificateFile instead.
    Note 2: The ca-bundle file must contain the intermediate certificate (e.g. DigiCertCA.crt) followed by the root certificate (e.g. TrustedRoot.crt)  – particularly in this order.

Step 4: Save the .config file

Inspect the newly configured Virtual Host block for potential typos and errors. If everything looks good, save the .config file.

Step 5: Scan for errors

Now, it’s time to add the final touches to your SSL installation. First, use the apachectlConfigtest command to scan for errors. If there’s an issue with the configuration, perform the installation steps again, from the very beginning. If there are no errors, move on to the final step

Step 6: Restart the Apache server

All that’s left is to restart the Apache server. Run the following commands: apachectl stop and apachectl start.

You’ve successfully configured your SSL certificate on your Debian server. You can always check the state of your SSL installation with these excellent SSL tools.

Where to buy an SSL Certificate for a Debian server?

The best place to buy an SSL Certificate for Debian is from SSL Dragon. We offer unbeatable prices, regular discounts, and great deals on the entire range of our SSL products. We’ve carefully selected the best SSL brands on the market to provide your website with bulletproof encryption. All our SSL certificates are compatible with Debian.

Get an SSL certificate now

To help you pick the ideal SSL certificate, we built a couple of exclusive SSL tools. Our SSL Wizard takes care of your searching and recommends the best SSL deal for your online project. On the other hand, the Certificate Filter sorts and compares different SSL certificates by price, validation, and features.

If you find any inaccuracies, or you have details to add to these SSL installation instructions, please feel free to send us your feedback at [email protected]. Your input would be greatly appreciated! Thank you.