How To Install Free SSL Certificate On Ubuntu
In this article, we will learn how to install a free SSL Certificate on Ubuntu using Apache webserver. We will install Let’s Encrypt Free SSL for our website. You can also install SSL for unlimited websites by the following guidelines on the Ubuntu server.
Add repository in Ubuntu To Install Free SSL On Apache2 Server
We need a repository in our Ubuntu server to install free SLL for our websites which are running with LAMP. So, Please run the following commands to add a repository.
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
Install python-certbot-apache to Get Free SLL
Now, we will install python-certbot-apache in our ubuntu server to install a free SLL certificate on ubuntu. Therefore, We will run the following commands.
sudo apt-get install python-certbot-apache
Install Free SLL Certificate On Ubuntu Websites
Now, We will install free SSL certificate for our website by running the following commands. If you want a secure web email then add your email in this command otherwise remove email command. Note, before running this command first confirm that your website is running on this server otherwise free SSL will be not installed on your website.
sudo certbot --apache -m firstname.lastname@example.org -d example.com -d www.example.com
When you need SSL Certificate for any of your websites next time then run only above command.
Redirect Website To Free SSL Certificate
After installing the SSL Certificate, You will see option redirect website to SSL. So, Please select option 2 and enter . Like this
Auto-Renew Free SLL Certificate On Ubuntu
finally, We need to run following command to auto-renewal for free SLL certificate.
sudo crontab -e
If you will see to select an option, Then select option 2 and press enter and paste the following code at the bottom of the opening file.
0 1 * * * /usr/bin/certbot renew & > /dev/null
In Conclusion: We will hope, You will install a free SSL certificate on Ubuntu with Apchae2 for your website by following our provided guidelines.