Article original Publié le : 1 novembre 2022 Mise à jour le : – |
L’intérêt pour un labs en local, fournir aux fronts un certificat valide,
Gain de temps, cela évite d’avoir à générer un certificat par serveur ou de faire des autosignés.
Création du certificat
1 |
$ sudo certbot certonly --server https://acme-v02.api.letsencrypt.org/directory --manual -d '*.izero.fr' |
/!\ Comme mentionné ci-dessous, il faut créer une entrée TXT chez son registrar avec la valeur afficher avant de continuer.
1 |
_acme-challenge 10800 IN TXT "tPlpOAnLphhw-MabxtgUFWqetAJdlN9fVvAcSPEq4qQ" |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Please deploy a DNS TXT record under the name: _acme-challenge.izero.fr. with the following value: tPlpOAnLphhw-MabxtgUFWqetAJdlN9fVvAcSPEq4qQ Before continuing, verify the TXT record has been deployed. Depending on the DNS provider, this may take some time, from a few seconds to multiple minutes. You can check if it has finished deploying with aid of online tools, such as the Google Admin Toolbox: https://toolbox.googleapps.com/apps/dig/#TXT/_acme-challenge.izero.fr. Look for one or more bolded line(s) below the line ';ANSWER'. It should show the value(s) you've just added. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Press Enter to Continue |
Interroger ensuite le dns et patienter quelques minutes jusqu’à récupérer la valeur TXT
1 |
$ dig -t txt _acme-challenge.izero.fr +short |
1 |
"tPlpOAnLphhw-MabxtgUFWqetAJdlN9fVvAcSPEq4qQ" |
Résultat
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Successfully received certificate. Certificate is saved at: /etc/letsencrypt/live/izero.fr/fullchain.pem Key is saved at: /etc/letsencrypt/live/izero.fr/privkey.pem This certificate expires on 2023-01-30. These files will be updated when the certificate renews. NEXT STEPS: - This certificate will not be renewed automatically. Autorenewal of --manual certificates requires the use of an authentication hook script (--manual-auth-hook) but one was not provided. To renew this certificate, repeat this same certbot command before the certificate's expiry date. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
Source : https://certbot.eff.org/fr/faq#does-let-s-encrypt-issue-wildcard-certificates