Forked from craigvantonder/install-configure-letsencrypt.md
Created
March 12, 2020 18:46
-
-
Save ronaldoedy/b4e1ba02c309f8f85f3f59f9b5b0f15b to your computer and use it in GitHub Desktop.
Install and configure LetsEncrypt on Ubuntu Server 14.04 & 16.04 (Apache)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04 | |
# Download the Let’s Encrypt Client | |
cd /usr/local/sbin | |
sudo wget https://dl.eff.org/certbot-auto | |
sudo chmod a+x /usr/local/sbin/certbot-auto | |
# Set Up the SSL Certificate | |
certbot-auto --apache -d example.com | |
# Remove above and uncomment below if you want to include sub domains | |
#certbot-auto --apache -d example.com -d www.example.com | |
# Creating a new Cronjob when no Cron jobs exist while running crontab -e as root? | |
echo "30 2 * * 1 /usr/local/sbin/certbot-auto renew > /var/log/le-renew.log" >> /var/spool/cron/crontabs/root | |
chown root:root /var/spool/cron/crontabs/root | |
chmod 600 /var/spool/cron/crontabs/root | |
# Remove above and uncomment below if you want to append to an existing list of Cron jobs, i.e. Cron jobs exist when running crontab -e? | |
#echo "30 2 * * 1 /usr/local/sbin/certbot-auto renew >> /var/log/le-renew.log" >> /var/spool/cron/crontabs/root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment