rita.linkの完全閉鎖作業において、Let's Encryptで発行した証明書を失効させたが、そのときのメモ。まぁあっさりと終わりますがね。
certbot(snapによって自動更新されている)の場合、revoke
のあとに--cert-name
か--cert-path
で失効させる証明書を指定する。
ACME認証は行わないので、予めnginx側で当該ドメインのSSL設定を外しておいたほうが吉(恐らくpost-hookなどが動く→nginxが証明書を読み込めずエラーとなるため)。
自分の場合は--cert-nameでどのドメインの証明書を失効させるか指定した。
$ sudo certbot revoke --cert-name rita.link
失効処理後に証明書削除するか?と2度聞かれるのでyと答えておく。
Saving debug log to /var/log/letsencrypt/letsencrypt.log - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Would you like to delete the certificate(s) you just revoked, along with all earlier and later versions of the certificate? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es (recommended)/(N)o: y - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The following certificate(s) are selected for deletion: * rita.link WARNING: Before continuing, ensure that the listed certificates are not being used by any installed server software (e.g. Apache, nginx, mail servers). Deleting a certificate that is still being used will cause the server software to stop working. See https://certbot.org/deleting-certs for information on deleting certificates safely. Are you sure you want to delete the above certificate(s)? - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: y Deleted all files relating to certificate rita.link. Congratulations! You have successfully revoked the certificate that was located at /etc/letsencrypt/live/rita.link/cert.pem.
これで失効処理され、証明書のファイルも削除される。