Un tutorial simplu adresat administratorilor de webservere care doresc sa stearga din Certbot certificatele SSL ale domeniilor care nu mai sunt gazduite pe server. Delete old domains certbot certificates.
Certbot este un software open-source folosit de multi administratori de sistem pe CentOS / RHEL pentru administrarea certificatelor HTTPS / TLS / SSL Let’s Encrypt.
Operarea certbot se face prin 명령 줄 executate direct in webserver (conexiune SSH sau consola), iar pentru a instala un certificat este suficient ca domeniul / subdomeniile sa fie gazduite pe acel server si sa fie active in internet pe IP-ul serverului. Dupa executarea comenzii “certbot” se vor lista numeric toate domeniile gazduite pe server pentru care putem instala un certificat Let’s Encrypt. Tastam cu spatiu intre ele numerele corespunzatoare fiecarui nume de domeniu pentru care se va face instalarea certificatului SSL.

O mica problema este atunci cand de pe webserver a fost sters un domeniu care a avut certificat instalat prin Certbot. Acesta va fi listat in continuare la comanda prin care verificam perioada de valabilitate a certificatelor SSL pentru toate domeniile. Daca de-a lungul timpului pe server au fost mai multe domenii, va fi destul de dificil de urmarit lista de certificate certbot.
certbot certificates
Cel mai bine ar fi ca in lista de certificate sa nu ramana decat domeniile active.
기존 도메인 Certbot 인증서 삭제 – 방법
일반적으로 웹 서버에서 도메인이나 하위 도메인을 삭제하기 전에 먼저 이를 취소하고 Let's Encrypt 인증서를 삭제해야 합니다. 우리는 주문을 실행합니다 “certbot” 활성 도메인이 포함된 숫자 목록을 표시하려면 다음 순서를 따르세요. “certbot delete number number” SSL 인증서를 삭제하려면 이전 도메인 certbot 인증서를 제거합니다.
웹서버에서 도메인을 삭제하기 전에 이 작업을 수행하지 않은 경우 해당 도메인은 certbot의 인증서 목록에 남아 있게 됩니다. certbot certificates.
활성화된 도메인과 과거에 certbot을 통해 활성화된 도메인에 대한 데이터는 서버의 세 위치에 보관됩니다. 맞춤 제작 “certbot 인증서” 이러한 도메인은 서버에 더 이상 존재하지 않더라도 계속 나열됩니다.
/etc/letsencrypt/live
/etc/letsencrypt/renewal
/etc/letsencrypt/archive
웹 서버에서 명령을 실행합니다. “ls -all /etc/letsencrypt/live” ca sa vedem domeniile prezente in Let’s Encrypt.
Identificam domeniile pe care dorim sa le stergem, fie din lista afisata la comanda de mai sus fie din “certbot certificates“, apoi executam urmatoarea comanda:
certbot delete --cert-name olddomain.tld
Confirmam cu “Y” stergerea domeniului din lista ce certificate Certbot.
[root@buffy ~]# certbot delete --cert-name olddomain.tld
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certificate(s) are selected for deletion:
* olddomain.tld
Are you sure you want to delete the above certificate(s)?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Deleted all files relating to certificate olddomain.tld.
[root@buffy ~]#
Certificatele SSL vor fi sterse (Delete old domains certbot certificates) din Certbot atat pentru numele de domeniu cat si pentru subdomeniile acestuia, daca foloseau acelasi certificat.
Certificate Name: olddomain.tld
Serial Number: 3fd34e0e3304521371abe948
Key Type: RSA
Domains: www.olddomain.tld olddomain.tld
Expiry Date: 2022-02-09 09:46:12+00:00 (INVALID: EXPIRED)
Certificate Path: /etc/letsencrypt/live/olddomain.tld/fullchain.pem
Private Key Path: /etc/letsencrypt/live/olddomain.tld/privkey.pem
Sunt si scenarii in care putem utiliza certificate SSL diferite pentru domeniu si unele subdomenii. In special atunci cand pe langa Certbot folosim combinat administrator DNS si SSL serviciul Cloudflare.