Skip to content

Instantly share code, notes, and snippets.

@RadoslawB
Forked from HarshadRanganathan/letsencrypt
Created March 17, 2020 10:14
Show Gist options
  • Save RadoslawB/4a2ebcec656e329987dc3cf05b50956d to your computer and use it in GitHub Desktop.
Save RadoslawB/4a2ebcec656e329987dc3cf05b50956d to your computer and use it in GitHub Desktop.
Let's Encrypt SSL for Nginx in Amazon Linux AMI instance
# Install wget
yum install wget -y
# Install certbot-auto
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
# Obtain SSL certificate with Nginx plugin for the domain
sudo ./certbot-auto --nginx -d app.com --debug
# Test SSL configuration
https://www.ssllabs.com/ssltest/analyze.html?d=app.com
# Configure cron job for SSL auto-renewal
sudo crontab -e
# Add below line in crontab
0 6 * * * /home/ec2-user/certbot-auto renew --text >> /home/ec2-user/certbot-cron.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment