How to Install Let's Encrypt SSL in Apache on Ubuntu 22.04

To install Let's Encrypt SSL on Apache in Ubuntu 22.04, you can use the Certbot tool. Certbot is a free and automated tool for obtaining and renewing SSL certificates. Here are the steps:

Step 1 : Install Certbot

First, you need to install the Certbot package. Open a terminal and run the following commands:

Step 2 : Configure Apache for the New Domain

Add a VirtualHost block for your domain:

Replace /var/www/html/example.devtutorial.io/public_html with the actual path to your website's root directory.

Step 3 : Enable the New Virtual Host

Enable the new virtual host configuration:

Step 4 : Restart Apache

Restart Apache to apply the changes:

Step 5 : Obtain SSL Certificate

- Now, run Certbot for the new domain to obtain an SSL certificate:

- Certbot will guide you through the process, enter your email, and agree to the terms.

Step 6 : Restart Apache

After obtaining and configuring the SSL certificate, restart Apache to apply the changes:

Step 7 : Test Renewal for the New Domain

As before, test the renewal process for the new domain:

Step 8 : Verify SSL Configuration: Open your web browser and enter the URL for your domain.

You've successfully configured Apache and obtained an SSL certificate for the new domain using Let's Encrypt and Certbot. Your website should now be accessible over HTTPS.