[memo] Let's Encrypt を使ったサブドメインを削除した際、証明書失効、設定ファイル削除を忘れて certbot-auto でエラーがでる

頻繁に行うことでは無いので、忘れそう。

CentOS 6.9 で virtualenv: コマンドが見つかりません 対策
[root ~]# /usr/bin/scl enable python27 bash
失効する certX.pem を特定
[root ~]# ls -la /etc/letsencrypt/live/www.example.jp/
letsencrypt の証明書を失効させる
[root ~]# certbot-auto revoke --cert-path=/etc/letsencrypt/archive/www.example.jp/cert5.pem --no-bootstrap
Creating virtual environment...
Installing Python packages...
Installation succeeded.
Saving debug log to /var/log/letsencrypt/letsencrypt.log

-------------------------------------------------------------------------------
Congratulations! You have successfully revoked the certificate that was located
at /etc/letsencrypt/archive/www.example.jp/cert5.pem

-------------------------------------------------------------------------------

注記 : --no-bootstrap をつけ忘れると

Bootstrapping dependencies for RedHat-based OSes... (you can skip this with --no-bootstrap)
yum is /usr/bin/yum
……
が始まるので忘れないこと(真面目に更新していれば必要無いはず)

letsencrypt の設定ファイルを削除する
[root ~]# certbot-auto delete -d www.example.jp
Saving debug log to /var/log/letsencrypt/letsencrypt.log

Which certificate would you like to delete?
-------------------------------------------------------------------------------
1: www.example.com
2: www.example.org
3: www.example.jp

-------------------------------------------------------------------------------
Select the appropriate number [1-3] then [enter] (press 'c' to cancel): 3

-------------------------------------------------------------------------------
Deleted all files relating to certificate www.example.jp.
-------------------------------------------------------------------------------

これまでは、
/etc/letsencrypt/live/www.example.jp/
/etc/letsencrypt/archive/www.example.jp/
/etc/letsencrypt/renewal/www.example.jp/
を手動で削除していたが今は certbot-auto で delete が使える。

[root ~]# rm /etc/httpd/conf.d/www.example.jp
[root ~]# service httpd graceful
aws route53 該当ドメイン DNSレコード削除

コメント

このブログの人気の投稿

[memo] LibreOffice バージョン: 5.2.6.2 Calc でエラーがでた BASIC を読み込む際の エラー:一般的なエラー.一般的な I/O エラー。

Amazonプライム会員の無料体験から継続しない手続きをする際「自動移行しない」が表示されないので悩んだ。(結果として自動更新をキャンセルする事ができました)

[memo] go get でインストールしたが利用しなくなったパッケージを削除する