let_s_encrypt
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
let_s_encrypt [2018/01/10 03:29] – simon | let_s_encrypt [2019/09/12 19:46] – simon | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
===== Configuration des certificats Let's Encrypt ===== | ===== Configuration des certificats Let's Encrypt ===== | ||
+ | === Acme.sh === | ||
+ | [[https:// | ||
+ | |||
+ | La première chose est d' | ||
+ | <code bash> | ||
+ | # apt install socat | ||
+ | # curl https:// | ||
+ | </ | ||
+ | |||
+ | Ensuite, il faut avoir un domaine déjà configuré en HTTP, avec un dossier accessible. Une fois que c'est fait, il n'y a plus qu'à suivre les [[https:// | ||
+ | |||
+ | <code bash> | ||
+ | # acme.sh --issue -d plouf.com -d www.plouf.com -w / | ||
+ | </ | ||
+ | |||
+ | __**Bonus :**__ L' | ||
+ | <code bash> | ||
+ | 4 0 * * * "/ | ||
+ | </ | ||
+ | |||
+ | == Choisir une clé ECC et sa taille == | ||
+ | <code bash> | ||
+ | # acme.sh --issue -d plouf.com -d www.plouf.com -w / | ||
+ | </ | ||
+ | |||
+ | == Wildcard == | ||
+ | <code bash> | ||
+ | $ acme.sh --issue -d artanux.be -d ' | ||
+ | </ | ||
+ | |||
+ | == Arrêter le renouvellement d'un certificat == | ||
+ | Les explications sont sur [[https:// | ||
+ | <code bash> | ||
+ | # rm -r ~/ | ||
+ | </ | ||
+ | |||
+ | === Certbot === | ||
+ | <WRAP center round important 60%> | ||
+ | Cette partie est un peu ancienne et plus forcément pertinente... | ||
+ | </ | ||
+ | |||
J'ai configuré les certificats pour plusieurs noms de domaines et voici la procédure suivie, pour le domaine fictif " | J'ai configuré les certificats pour plusieurs noms de domaines et voici la procédure suivie, pour le domaine fictif " | ||
Ligne 24: | Ligne 65: | ||
certbot 0.19.0 | certbot 0.19.0 | ||
</ | </ | ||
+ | |||
+ | <WRAP center round alert 60%> | ||
+ | Sur une installation plus récente, j'ai du passer par [[pip]] pour installer certbot 0.21. L' | ||
+ | </ | ||
+ | |||
<code bash> | <code bash> | ||
Ligne 45: | Ligne 91: | ||
Waiting for verification... | Waiting for verification... | ||
Cleaning up challenges | Cleaning up challenges | ||
- | Created an SSL vhost at / | + | Created an SSL vhost at / |
Enabled Apache socache_shmcb module | Enabled Apache socache_shmcb module | ||
Enabled Apache ssl module | Enabled Apache ssl module | ||
- | Deploying Certificate for caliban.be to VirtualHost / | + | Deploying Certificate for caliban.be to VirtualHost / |
- | Enabling available site: / | + | Enabling available site: / |
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. | Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. | ||
Ligne 59: | Ligne 105: | ||
------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ||
Select the appropriate number [1-2] then [enter] (press ' | Select the appropriate number [1-2] then [enter] (press ' | ||
- | Redirecting vhost in / | + | Redirecting vhost in / |
------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ||
Ligne 70: | Ligne 116: | ||
IMPORTANT NOTES: | IMPORTANT NOTES: | ||
- Congratulations! Your certificate and chain have been saved at: | - Congratulations! Your certificate and chain have been saved at: | ||
- | / | + | / |
Your key file has been saved at: | Your key file has been saved at: | ||
- | / | + | / |
Your cert will expire on 2018-04-10. To obtain a new or tweaked | Your cert will expire on 2018-04-10. To obtain a new or tweaked | ||
| | ||
Ligne 83: | Ligne 129: | ||
</ | </ | ||
- | On peut tester un renouvelement | + | On peut tester un renouvellement |
<code bash> | <code bash> | ||
# certbot renew --dry-run | # certbot renew --dry-run | ||
Ligne 90: | Ligne 136: | ||
Actuellement, | Actuellement, | ||
+ | ==== Clés plus longues ==== | ||
+ | <code bash> | ||
+ | # certbot certonly -a webroot --rsa-key-size 4096 --webroot-path=/ | ||
+ | </ | ||
===== Sources ===== | ===== Sources ===== | ||
* [[https:// | * [[https:// |