To install Let's Encrypt SSL in Nginx on Ubuntu 24.04, follow the steps below:
Step 1 : Ensure your domain has DNS records properly set up for verification.
Step 2 : Update your system:
Step 3 : Install Certbot and python3-certbot-nginx:
Step 4 : Create a Nginx configuration file (example.devtutorial.io) and add the necessary configuration:
Add the configuration for your domain. Example:
Step 5 : Create a directory for your domain and a test HTML file:
Add some content to the HTML file, then save and close it.
Step 6 : Enable the Nginx configuration:
Step 7 : Test the Nginx configuration:
Step 8 : Restart Nginx:
Step 9 : Obtain SSL certificate:
Follow the prompts:
- Enter your email address.
9b Agree to the terms of service.
- Share your email address with the EFF.
- Once successful, you'll receive a confirmation message.
Step 10 : Test the certificate renewal process:
Step 11 : Visit your domain to check the SSL installation.
Congratulations! You have successfully installed Let's Encrypt SSL in Nginx on Ubuntu 24.04.