-
-
Save RadoslawB/4a2ebcec656e329987dc3cf05b50956d to your computer and use it in GitHub Desktop.
Let's Encrypt SSL for Nginx in Amazon Linux AMI instance
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
# 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