To install Let's Encrypt SSL on Apache in Ubuntu 23.10, you can use the Certbot tool, which is the recommended client for Let's Encrypt. Here are the steps:
Step 1 : Update Package Lists:
Update the package lists to make sure you have the latest information about available packages:
Step 2 : Install Certbot:
Install Certbot and the Apache plugin:
Step 3 : Apache Configuration:
Create a new Apache configuration file for example.devtutorial.io
: Replace example.devtutorial.io with your actual domain
Add the following configuration. Adjust the paths and settings based on your specific requirements:
Save and exit the text editor.
Step 4 : Enable the New Site:
Enable the new site configuration:
Step 4 : Restart Apache:
Restart Apache to apply the changes:
Step 5 : Obtain SSL Certificate:
Run the following command to obtain and install the SSL certificate for example.devtutorial.io
:
- Certbot will check for the Apache configuration and prompt you to enter your email address for renewal and security notifications. Type in your email address and press Enter
.
- You will then be asked to read and agree to the terms of service. If you agree, type Y
and press Enter
.
- Certbot will ask if you want to share your email address with the Electronic Frontier Foundation for their newsletter. You can choose Y
or N
based on your preference and press Enter
.
- Certbot will communicate with the Let's Encrypt server to verify the domain ownership. Certbot will display a success message, indicating that the SSL certificate has been obtained and installed.
Step 6 : Automatically Renew Certificates:
Certbot can automatically renew your certificates. The renewal process is typically set up as a cron job. Certbot will automatically deploy the renewal configuration, so there's no need to add a separate cron job.
Step 7 : Verify Automatic Renewal:
You can test the automatic renewal process by running:
If this runs without errors, your renewal process is correctly set up.
Step 8 : Test Website Access:
Open a web browser and navigate to https://example.devtutorial.io. Ensure that your website is accessible over HTTPS. You should see a padlock icon in the address bar, indicating a secure connection.
You've successfully installed Let's Encrypt SSL on Apache in Ubuntu 23.10. Your website should now be accessible over a secure HTTPS connection.