Schon in seit Jahren gibt es kostenlose Zertifikate von Letsencrypt, jedoch gibt es seit Apache 2.4 ein Modul zum automatischen aktualisieren der Zertifikate. Zusätzliche Software wie der Certbot ist nicht mehr notwendig.

Die Installation von Apache erfolgt aus den Ubuntu Paketen.

sudo apt install apache2

Die notwendigen Modulle für SSL, OCSP Stapling und Modul „MD“ müssen aktiviert werden.

sudo a2enmod ssl md socache_shmcb

Hier ein Beispiel für die Konfiguration der Domain example.com mit Zertifikat von Letsencrypt.

sudo vim /etc/apache2/sites-available/example_com.conf
sudo a2ensite example_com.conf

<IfModule mod_socache_shmcb.c>
 # sudo a2enmod socache_shmcb
 SSLUseStapling On
 SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"
</IfModule>
 
<IfModule mod_md.c>
 # sudo a2enmod md
 MDStoreDir /etc/apache2/md/
 MDCertificateAgreement https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
 MDomain example.com www.example.com
</IfModule>
 
<IfModule mod_ssl.c>
<VirtualHost *:443>
 Protocols h2 http/1.1 acme-tls/1
 SSLEngine On
 SSLCompression Off
 SSLHonorCipherOrder On
 SSLSessionTickets Off
 SSLStrictSNIVHostCheck Off
 SSLProtocol ALL -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
 SSLCipherSuite ALL:!ADH:!EXP:!LOW:!RC2:!3DES:!SEED:!RC4:+HIGH:+MEDIUM
 SSLCertificateFile /etc/apache2/md/domains/example.com/pubcert.pem
 SSLCertificateKeyFile /etc/apache2/md/domains/example.com/privkey.pem
 SSLCACertificateFile /etc/apache2/md/lets-encrypt-x3-cross-signed.pem
 
 ServerAdmin webmaster@example.com
 ServerName www.example.com
 ServerAlias www.example.com
 
 HostnameLookups Off
 UseCanonicalName On
 ServerSignature Off
 
 <Directory />
  AllowOverride None
  Require all denied
 </Directory>
 
 DocumentRoot /var/www/html
 
</VirtualHost>
</IfModule>

Quelle: SSL Configuration Generator