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

To install Let's Encrypt SSL on Apache in Ubuntu 23.04, follow these steps:

Step 1 : Ensure the domain is DNS configured for verification.

Step 2 : Update your system:

Step 3 : Install Certbot and Python3-Certbot-Apache:

Step 4 : Create a configuration file for your domain (e.g., example.devtutorial.io) and add the necessary configurations:

Add the following content, adjusting paths and configurations accordingly:

Step 5 : Create the directory for your domain and an index.html file:

Add some content to index.html and save the file.

Step 6 : Enable the site configuration:

Step 7 : Test the Apache configuration for syntax errors:

Step 8 : Restart Apache to apply changes:

Step 9 : Run the Certbot command to obtain the SSL certificate for your domain:

- The Certbot tool will prompt you to enter your email address for renewal and security notices. Type your email address and press Enter.

- Agree to the terms of service by typing 'y' and pressing Enter.

- Certbot will ask if you want to share your email address with the Electronic Frontier Foundation (EFF). Choose 'y' or 'n' based on your preference.

- Certbot will then communicate with the Let's Encrypt server, perform the necessary validation, and automatically configure Apache with the obtained SSL certificate.

- Once the process completes successfully, Certbot will display a message confirming the SSL installation.

Step 10 : Test certificate renewal:

Step 11 : Visit your domain to verify the results.

Congratulations! You have successfully installed Let's Encrypt SSL on Apache in Ubuntu 23.04 for your domain example.devtutorial.io.