SSL and its successor protocol TLS enable secure connections over an inherently insecure Internet. Through the use of HTTPS, confidentiality, integrity and availability of a service can be more strongly enforced.

In this exercise, the objective is to correctly configure and install an TLS certificate on the web server built earlier.

Let's Encrypt provides easier access to trusted TLS certificates. At the time of posting, the project is still in beta and installation on Enterprise Linux including CentOS has to performed manually.

Getting the Certificate

From terminal, run the following commands:

git clone

cd letsencrypt

Replace with the target domain:

./letsencrypt-auto certonly --manual -d -d

This will create temporary files that the certificate authority will use to validate the given request.

This next step requires a new shell terminal running with root privilege.

mkdir -p /var/www/html/.well-known/acme-challenge

cd /var/www/html

From the first terminal, copy and paste the string of text starting from printf "%s".

Returning to the first shell, pressing enter should return a confirmation message. If successful, the generated certificate and chain are now stored at the location /etc/letsencrypt/live/


This next step is the manual configuration, enabling the web server to correctly use the installed certificate.

Using a text editor, the following amendments are made to /etc/httpd/conf.d/ssl.conf.

<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile      SSLCertificateFile /etc/letsencrypt/live/
    SSLCertificateKeyFile   /etc/letsencrypt/live/
    SSLCACertificateFile    /etc/letsencrypt/live/

    # HSTS (mod_headers is required) (15768000 seconds = 6 months)
    Header always set Strict-Transport-Security "max-age=15768000"

# modern configuration, tweak to your needs
SSLProtocol             all -SSLv3 -TLSv1
SSLHonorCipherOrder     on
    SSLCompression          off
    SSLSessionTickets       off

    # OCSP Stapling, only in httpd 2.3.3 and later
    SSLUseStapling          on
    SSLStaplingResponderTimeout 5
    SSLStaplingReturnResponderErrors off
SSLStaplingCache        shmcb:/var/run/ocsp(128000)


  • This configuration will break HTTPS on obsolete browsers therefore it is the service owner's discretion on whether to support weaker cryptographic protocols or additionally offer the service through HTTP.

  • Remember to enable port 443 on the web server ;-)


  • Let's Encrypt documentation
  • Let's Encrypt community page
  • Mozilla has an SSL configurator for various web servers and requirements. Link here
  • Qualys have a tool to test server SSL/ TLS configurations. The tool can be found here. At the time of posting, this site is rated at A+