Let’s encrypt の証明書を失効させ、ドメインの設定を削除する
証明書の失効作業
[root@falcon21 ~]# certbot revoke --cert-path /etc/letsencrypt/live/falcon21.space-0001/cert.pem
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
An unexpected error occurred:
The client lacks sufficient authorization :: Certificate is expired
クライアントに十分な権限がありません。 証明書の有効期限が切れています
Please see the logfiles in /var/log/letsencrypt for more details.
[root@falcon21 ~]# certbot revoke --cert-path /etc/letsencrypt/live/falcon21.space/cert.pem
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you like to delete the cert(s) you just revoked, along with all earlier
and later versions of the cert?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es (recommended)/(N)o: y
No match found for cert-path /etc/letsencrypt/live/falcon21.space/cert.pem!
すべて失効しているので、/etc/letsencrypt 内のすべてを削除、 /var/log/letsencrypt/内のすべてを削除 |
Certbot証明取り直し
ウェブサーバー向け
[root@falcon21 ~]# /usr/local/certbot/certbot-auto certonly --webroot -w /var/www/html -m webmaster@falcon21.space -d falcon21.space
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: a
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for falcon21.space
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/falcon21.space/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/falcon21.space/privkey.pem
Your cert will expire on 2020-06-29. To obtain a new or tweaked
version of this certificate in the future, simply run certbot-auto
again. To non-interactively renew *all* of your certificates, run
"certbot-auto renew"
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
メールサーバー向け
[root@falcon21 ~]# certbot certonly --webroot -w /var/www/html -m postmaster@falcon21.space -d mail.falcon21.space --agree-tos
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for mail.falcon21.space
Using the webroot path /var/www/html for all unmatched domains.
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/mail.falcon21.space/fullchain.pem ・・・有効でない。
Your key file has been saved at:
/etc/letsencrypt/live/mail.falcon21.space/privkey.pem
Your cert will expire on 2020-06-29. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
メールサーバー設定
/etc/letsencrypt/live/falcon21.space/privkey.pem で、メーラーが有効
webサーバー ホスト名とmail サーバーホスト名が同じ=falcon21.space だから、
[root@falcon21 ~]# certbot certonly --webroot -w /var/www/html -m postmaster@falcon21.space -d mail.falcon21.space --agree-tos は無効になってしまう。
これを削除