Forked from hewersonfreitas/install-configure-letsencrypt.sh
Created
August 3, 2020 14:00
-
-
Save lucasapoena/a8065d187a2bfb688b32e87531fda5f3 to your computer and use it in GitHub Desktop.
Install and configure LetsEncrypt on Ubuntu Server 14.04 & 16.04 (Apache) forked from craigvantonder/install-configure-letsencrypt.sh
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