Skip to content

Instantly share code, notes, and snippets.

@alexleone
Created February 4, 2020 16:00
Show Gist options
  • Save alexleone/50a8ebf2b5c5886f8e4a9fdf147f9dc7 to your computer and use it in GitHub Desktop.
Save alexleone/50a8ebf2b5c5886f8e4a9fdf147f9dc7 to your computer and use it in GitHub Desktop.
Set Up Lets Encrypt on Ubuntu 16.04
# Find the repo
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
# Get cert bot
sudo apt-get install python-certbot-apache
# The certbot Let’s Encrypt client is now ready to use.
# Setup cert for one domain
sudo certbot --apache -d example.com
# Multiple domain setup - For this example, the base domain will be example.com.
sudo certbot --apache -d example.com -d www.example.com
# When the installation is finished, you should be able to find the generated
# certificate files at /etc/letsencrypt/live. You can verify the status of your SSL
# certificate with the following link (don’t forget to replace example.com with your base domain):
# https://www.ssllabs.com/ssltest/analyze.html?d=example.com&latest
# Let’s Encrypt certificates only last for 90 days. However, the certbot package
# we installed takes care of this for us by running certbot renew twice a day via
# a systemd timer. On non-systemd distributions this functionality is provided by
# a cron script placed in /etc/cron.d. The task runs twice daily and will renew any
# certificate that’s within thirty days of expiration.
# Test dry run
sudo certbot renew --dry-run
# Original Post
# https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment