First run these commands in terminal:
sudo apt-get updatesudo apt-get install software-properties-commonsudo add-apt-repository ppa:certbot/certbotsudo apt-get updatesudo apt-get install python-certbot-apache
Now you will be able to install multiple free LetsEncrypt SSL certificates by running the following terminal command for each of the domains on your server, replacing example.com with the domain you want an SSL certificate for.
sudo certbot –apache -d example.com -d www.example.com
If you want to force HTTPS then don’t forgot to update the .htaccess file for each website your want to force HTTPS on.
It’s also worth noting that when installing multiple LetsEncrypt SSL certificates on a server you may need to edit the following file manually to ensure each of the domains is included in this file. I’ve found when installing multiple LetsEncrypt SSL certificates on the same server it can overwrite the first entry in this file.
/etc/apache2/sites-available/000-default-le-ssl.config
Useful Resources
- https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04
- https://certbot.eff.org/all-instructions/#ubuntu-16-04-xenial-apache
Original Article Posted On: https://andycorby.com/install-letsencrypt-ssl-certificate-ubuntu-16-04/
No comments:
Post a Comment