Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ed769e8c40 |
22
Readme.md
22
Readme.md
@@ -11,6 +11,9 @@ La configuration dns doit permettre de résoure le nom de notre serveur ( liaX.f
|
||||
### Installation du client
|
||||
|
||||
Installer le paquet _certbot_ (depuis les dépôts EPEL).
|
||||
```bash
|
||||
dnf install -y certbot
|
||||
```
|
||||
|
||||
### Procéder à la demande de certificat
|
||||
|
||||
@@ -29,6 +32,20 @@ ls -l /etc/letsencrypt/live/
|
||||
### Utiliser les certificats
|
||||
|
||||
Utiliser les directives apache SSLCertificateFile et SSLCertificateKeyFile
|
||||
```bash
|
||||
SSLEngine on
|
||||
SSLCertificateFile /etc/letsencrypt/live/lia1.formation.opendoor.fr/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/lia1.formation.opendoor.fr/privkey.pem
|
||||
SSLProtocol +TLSv1.2
|
||||
SSLCompression off
|
||||
SSLHonorCipherOrder on
|
||||
SSLCipherSuite TLS_AES_256_GCM_SHA384:TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDH
|
||||
Header always set Strict-Transport-Security "max-age=63072000;
|
||||
Header set Content-Security-Policy "default-src 'none'; img-src 'self'; script-src 'self'; style-src 'self'"
|
||||
Header set X-Content-Type-Options "nosniff"
|
||||
Header set X-Frame-Options "SAMEORIGIN"
|
||||
Header set X-XSS-Protection "1; mode=block"
|
||||
```
|
||||
|
||||
### Vérifier
|
||||
|
||||
@@ -40,6 +57,11 @@ Cependant en examinant le certificat, on constate qu'il provient de l'organisati
|
||||
### Configurer le renouvellement automatique du certificat
|
||||
|
||||
Créer une tâche planifiée permettant d'éxécuter une fois par semaine la commande _certbot renew_ en root
|
||||
```bash
|
||||
cat > /etc/cron.d/letsencrypt <<EOF
|
||||
00 01 * * 6 root /usr/bin/certbot renew
|
||||
EOF
|
||||
```
|
||||
|
||||
Créer le script /etc/letsencrypt/renewal-hooks/post/apache.sh avec le contenu suivant:
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user