Introduction
Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. This tutorial shows how to install Let's Encrypt for Apache.
The tutorial is prepared on Ubuntu 22.04.
However, it can be used for our other Ubuntu OS templates.
1. Starting with the system update
To do a system update, use:
sudo apt update
2. Installing Certbot
To do so, use:
sudo apt install certbot
3. Installing Certbot plugin for Apache
To do so, use:
sudo apt install python3-certbot-apache
4. Generating Let’s Encrypt SSL with Certbot
To do so, use:
certbot --apache -d your_domain_name
Output example:
root@58zi:~# certbot --apache -d example-domain.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for example-domain.com
5. Restarting the web server
To do so, use:
systemctl restart apache2
That's it. The certificate is installed.