#First, add the repository:
sudo add-apt-repository ppa:certbot/certbot
#You'll need to press ENTER to accept. Afterwards, update the package list to pick up the new repository's package information:
sudo apt-get update
#And finally, install Certbot from the new repository with apt-get:
sudo apt-get install python-certbot-apache
#Run the certbot command with:
sudo certbot --apache -d example.com -d www.example.com
#perform checks with https://www.ssllabs.com/ssltest/analyze.html?d=example.com&latest
#Repeat the certificate install command, now with the second virtual host you want to secure with Let’s Encrypt:
sudo certbot --apache -d test.com -d www.test.com