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

To install Let's Encrypt SSL on Nginx in Ubuntu 23.04:

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

Step 2 : Update the system:

Step 3 : Install Certbot and Python3-certbot-nginx:

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

Add the following basic Nginx configuration:

Save the file.

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

Add some content to the index.html file.

Save the file.

Step 6 : Enable the Nginx configuration:

Step 7 : Test the Nginx configuration:

Step 8 : Restart Nginx:

Step 9 : Obtain SSL certificate:

- Enter your email address.

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

- Share your email address for updates if you want by typing 'y'.

- You should receive a success message.

Step 10 : Test certificate renewal:

Step 11 : Visit your domain to check the results.

Congratulations, you have successfully installed Let's Encrypt SSL on Nginx in Ubuntu 23.04 for your domain example.devtutorial.io. Your website is now secured with SSL.