Created
May 24, 2020 17:53
-
-
Save vovandodev/36b8162c67971259ffa35da5678d3bf9 to your computer and use it in GitHub Desktop.
Install and configure LetsEncrypt on Ubuntu Server 14.04
This file contains hidden or 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 --nginx -d example.com | |
# Remove above and uncomment below if you want to include sub domains | |
certbot-auto --nginx -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