Skip to content

Instantly share code, notes, and snippets.

@imasimali
Created June 12, 2021 15:12
Show Gist options
  • Save imasimali/f02d962fb6f19e3bb43bc3e8b2091b1c to your computer and use it in GitHub Desktop.
Save imasimali/f02d962fb6f19e3bb43bc3e8b2091b1c to your computer and use it in GitHub Desktop.
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