Created
June 12, 2021 15:12
-
-
Save imasimali/f02d962fb6f19e3bb43bc3e8b2091b1c to your computer and use it in GitHub Desktop.
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
sudo nano /etc/apt/sources.list | |
#Write this into list | |
deb http://deb.debian.org/debian stretch-backports main contrib non-free | |
deb-src http://deb.debian.org/debian stretch-backports main contrib non-free | |
sudo apt update | |
sudo apt install python-certbot-nginx -t stretch-backports | |
sudo nano /etc/nginx/sites-available/default | |
#Replace example.com with your domain inside file. | |
sudo nginx -t | |
sudo systemctl reload nginx | |
sudo ufw allow 'Nginx Full' | |
sudo ufw delete allow 'Nginx HTTP' | |
sudo certbot --nginx -d domain.com -d www.domain.com | |
# To Check if renewal will work | |
sudo certbot renew --dry-run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment