[memo] Let's Encrypt を使ったサブドメインを削除した際、証明書失効、設定ファイル削除を忘れて certbot-auto でエラーがでる
頻繁に行うことでは無いので、忘れそう。
CentOS 6.9 で virtualenv: コマンドが見つかりません 対策
注記 : --no-bootstrap をつけ忘れると
letsencrypt の設定ファイルを削除する
これまでは、
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/を手動で削除していたが今は certbot-auto で delete が使える。
/etc/letsencrypt/archive/www.example.jp/
/etc/letsencrypt/renewal/www.example.jp/
[root ~]# rm /etc/httpd/conf.d/www.example.jpaws route53 該当ドメイン DNSレコード削除
[root ~]# service httpd graceful
コメント