Skip to content

Instantly share code, notes, and snippets.

@libracoder
Forked from zoharbabin/certbotresetcert.sh
Created September 27, 2021 09:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save libracoder/19223d54e29cd704ed04663a4816ce9c to your computer and use it in GitHub Desktop.
Save libracoder/19223d54e29cd704ed04663a4816ce9c to your computer and use it in GitHub Desktop.
Delete and reinstall SSL certificates with certbot on Ubuntu
certbot certificates
# find the path to the fullchain certificate you wish to reinstall
certbot revoke --cert-path /etc/letsencrypt/live/... #path to the cert from above
certbot delete --cert-name yourdomain.com
rm -Rf /etc/apache2/sites-available/000-default-le-ssl.conf #or whatever the name of the apache conf you had it configured on
rm -Rf 000-default-le-ssl.conf #or whatever the name of the apache conf you had it configured on
sudo apache2ctl restart
certbot #follow the guide to setup the new certificate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment