Last active
March 21, 2021 16:32
-
-
Save soundpress/aa177d4a6dbdd8a04b46be983d15eac1 to your computer and use it in GitHub Desktop.
Install/Reinstall Letsencrypt certbot on Amazon AMI Linux 2 - Apache 2 via Snap (2021 Feb)
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
if letsencrypt was prevously installed: | |
sudo yum remove certbot | |
else: | |
sudo yum install mod_ssl | |
# create virtual host - https://stackoverflow.com/a/38098334 | |
sudo yum install https://people.canonical.com/~mvo/snapd/amazon-linux2/repo/x86_64/packages/snap-confine-2.49-1.amzn2.1.x86_64.rpm | |
sudo yum install https://people.canonical.com/~mvo/snapd/amazon-linux2/repo/x86_64/packages/snapd-2.49-1.amzn2.1.x86_64.rpm | |
sudo systemctl enable --now snapd.socket | |
sudo systemctl start --now snapd.socket | |
sudo ln -s /var/lib/snapd/snap /snap | |
sudo snap install --classic certbot | |
sudo ln -s /snap/bin/certbot /usr/bin/certbot | |
sudo certbot --apache | |
# execute certbot instructions | |
crontab -e | |
01 2,14 * * * sudo certbot renew --dry-run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment