auto-ssl / lua-resty-auto-ssl

On the fly (and free) SSL registration and renewal inside OpenResty/nginx with Let's Encrypt.
MIT License
1.93k stars 182 forks source link

How to explicitly delete a domain/certificate? #275

Open marcfowler opened 2 years ago

marcfowler commented 2 years ago

If I've issued a certificate for a domain in the past for example.com and now want to explicitly, manually delete this and doesn't attempt to renew etc, how can I do that?

Is it enough to simply delete all of the files matching storage/file/example.com*? Will just deleting those cause any issues?

Thanks in advance for any help!

bryanus commented 1 year ago

here's what I do:

If the domain was previously issued, but has long since expired, then delete the domain directory from certs directory /etc/resty-auto-ssl/letsencrypt/certs:

rm -fr www.domain.com

If you don't see a cert listed in certs, check the file storage directory:

cd etc/resty-auto-ssl/storage/file

Then delete the issued certs from the file storage directory:

rm -fr www.domain.com*

Finally, restart openresty and ping the domain in a browser to issue a new certificate:

sudo service openresty restart