mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Merge pull request #1349 from ericgaspar/patch-2
Update certificate_custom_fr.md
This commit is contained in:
commit
c7cdea8e9d
1 changed files with 30 additions and 26 deletions
|
@ -1,22 +1,23 @@
|
||||||
**Note :** depuis la version 2.5, Yunohost intègre la gestion automatisée de certificats Let's Encrypt. Vous pouvez donc facilement et gratuitement [installer un certificat Let's Encrypt](/certificate). Le document suivant décrit la méthodologie pour installer un certificat, payant, d'une autre autorité de certification (**Gandi**, **RapidSSL**, **StartSSL**, **Cacert**).
|
**Note :** depuis la version 2.5, YunoHost intègre la gestion automatisée de certificats Let's Encrypt. Vous pouvez donc facilement et gratuitement [installer un certificat Let's Encrypt](/certificate). Le document suivant décrit la méthodologie pour installer un certificat, payant, d'une autre autorité de certification (**Gandi**, **RapidSSL**, **StartSSL**, **Cacert**).
|
||||||
|
|
||||||
Quelques changements ont eu lieu qui impactent les procédures indiquées ci dessous :
|
Quelques changements ont eu lieu qui impactent les procédures indiquées ci-dessous :
|
||||||
|
|
||||||
* le groupe metronome n'est plus utilisé directement mais ssl-cert
|
* Le groupe metronome n'est plus utilisé directement mais ssl-cert.
|
||||||
* un repertoire /etc/yunohost/certs/DOMAIN.LTD-history/stamp est utilisé pour conserver chaque configuration créée et un lien symbolique est créé dessus.
|
* Un repertoire `/etc/yunohost/certs/DOMAIN.LTD-history/stamp` est utilisé pour conserver chaque configuration créée et un lien symbolique est créé dessus.
|
||||||
|
|
||||||
### Ajout d’un certificat signé par une autorité (autre que Let's Encrypt)
|
### Ajout d’un certificat signé par une autorité (autre que Let's Encrypt)
|
||||||
|
|
||||||
Après création du certificat auprès de votre autorité d’enregistrement, vous devez être en possession d’une clé privée, le fichier key et d’un certificat public, le fichier crt.
|
Après création du certificat auprès de votre autorité d’enregistrement, vous devez être en possession d’une clé privée, le fichier *key* et d’un certificat public, le fichier *crt*.
|
||||||
> Attention, le fichier key est très sensible, il est strictement personnel et doit être très bien sécurisé.
|
> Attention, le fichier *key* est très sensible, il est strictement personnel et doit être très bien sécurisé.
|
||||||
|
|
||||||
Ces deux fichiers doivent être copiés sur le serveur, s’ils ne s’y trouvent pas déjà.
|
Ces deux fichiers doivent être copiés sur le serveur, s’ils ne s’y trouvent pas déjà.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
scp CERTIFICAT.crt admin@DOMAIN.TLD:ssl.crt
|
scp CERTIFICAT.crt admin@DOMAIN.TLD:ssl.crt
|
||||||
scp CLE.key admin@DOMAIN.TLD:ssl.key
|
scp CLE.key admin@DOMAIN.TLD:ssl.key
|
||||||
```
|
```
|
||||||
|
|
||||||
Depuis Windows, scp est exploitable avec putty, en téléchargeant l’outil [pscp](http://the.earth.li/~sgtatham/putty/latest/x86/pscp.exe)
|
Depuis Windows, scp est exploitable avec Putty, en téléchargeant l’outil [pscp](http://the.earth.li/~sgtatham/putty/latest/x86/pscp.exe)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pscp -P 22 CERTIFICAT.crt admin@DOMAIN.TLD:ssl.crt
|
pscp -P 22 CERTIFICAT.crt admin@DOMAIN.TLD:ssl.crt
|
||||||
|
@ -38,7 +39,7 @@ Puis allez dans le dossier parent pour poursuivre.
|
||||||
cd /etc/yunohost/certs/DOMAIN.TLD/
|
cd /etc/yunohost/certs/DOMAIN.TLD/
|
||||||
```
|
```
|
||||||
|
|
||||||
Faites une sauvegarde des certificats d’origine de yunohost, par précaution.
|
Faites une sauvegarde des certificats d’origine de YunoHost, par précaution.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo mkdir yunohost_self_signed
|
sudo mkdir yunohost_self_signed
|
||||||
|
@ -75,7 +76,7 @@ Les certificats intermédiaires et root doivent être réunis avec le certificat
|
||||||
cat ae_certs/ssl.crt ae_certs/intermediate_ca.pem ae_certs/ca.pem | sudo tee crt.pem
|
cat ae_certs/ssl.crt ae_certs/intermediate_ca.pem ae_certs/ca.pem | sudo tee crt.pem
|
||||||
```
|
```
|
||||||
|
|
||||||
La clé privée doit être, elle, convertie au format pem.
|
La clé privée doit être, elle, convertie au format `.pem`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo openssl rsa -in ae_certs/ssl.key -out key.pem -outform PEM
|
sudo openssl rsa -in ae_certs/ssl.key -out key.pem -outform PEM
|
||||||
|
@ -89,21 +90,23 @@ cat crt.pem key.pem
|
||||||
|
|
||||||
Les certificats et la clé privée doivent ressembler à cela :
|
Les certificats et la clé privée doivent ressembler à cela :
|
||||||
|
|
||||||
`-----BEGIN CERTIFICATE-----`<br/>
|
```plaintext
|
||||||
`MIICVDCCAb0CAQEwDQYJKoZIhvcNAQEEBQAwdDELMAkGA1UEBhMCRlIxFTATBgNV`<br/>
|
-----BEGIN CERTIFICATE-----
|
||||||
`BAgTDENvcnNlIGR1IFN1ZDEQMA4GA1UEBxMHQWphY2NpbzEMMAoGA1UEChMDTExC`<br/>
|
MIICVDCCAb0CAQEwDQYJKoZIhvcNAQEEBQAwdDELMAkGA1UEBhMCRlIxFTATBgNV
|
||||||
`MREwDwYDVQQLEwhCVFMgSU5GTzEbMBkGA1UEAxMSc2VydmV1ci5idHNpbmZvLmZy`<br/>
|
BAgTDENvcnNlIGR1IFN1ZDEQMA4GA1UEBxMHQWphY2NpbzEMMAoGA1UEChMDTExC
|
||||||
`MB4XDTA0MDIwODE2MjQyNloXDTA0MDMwOTE2MjQyNlowcTELMAkGA1UEBhMCRlIx`<br/>
|
MREwDwYDVQQLEwhCVFMgSU5GTzEbMBkGA1UEAxMSc2VydmV1ci5idHNpbmZvLmZy
|
||||||
`FTATBgNVBAgTDENvcnNlIGR1IFN1ZDEQMA4GA1UEBxMHQWphY2NpbzEMMAoGA1UE`<br/>
|
MB4XDTA0MDIwODE2MjQyNloXDTA0MDMwOTE2MjQyNlowcTELMAkGA1UEBhMCRlIx
|
||||||
`ChMDTExCMREwDwYDVQQLEwhCVFMgSU5GTzEYMBYGA1UEAxMPcHJvZi5idHNpbmZv`<br/>
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OCl3up99naL5XAzCIp6r5
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
```
|
||||||
|
|
||||||
Enfin, sécurisez les fichiers de votre certificat.
|
Enfin, sécurisez les fichiers de votre certificat.
|
||||||
|
|
||||||
|
@ -114,13 +117,14 @@ sudo chown root:root -R ae_certs
|
||||||
sudo chmod 600 -R ae_certs
|
sudo chmod 600 -R ae_certs
|
||||||
```
|
```
|
||||||
|
|
||||||
Maintenant les certificats (les deux fichiers avec l'extension .pem) doivent être recopiés dans /etc/yunohost/certs/DOMAIN.TLD.
|
Maintenant les certificats (les deux fichiers avec l'extension `.pem`) doivent être recopiés dans `/etc/yunohost/certs/DOMAIN.TLD`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp ae_certs/*.pem ./
|
cp ae_certs/*.pem ./
|
||||||
```
|
```
|
||||||
|
|
||||||
Rechargez la configuration de nginx pour prendre en compte le nouveau certificat.
|
Rechargez la configuration de NGINX pour prendre en compte le nouveau certificat.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo service nginx reload
|
sudo service nginx reload
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Reference in a new issue