Hello,
Voici le contenu du fichier 000-default.conf
VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
Redirect permanent / https://monsite.ddns.net
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
et celui du fichier 000-default-ssl.conf
# On active le SSL
SSLEngine On
# On active tous les protocoles (TLS v1.0, TLS v1.1 et TLS v1.2), mais on désactive SSL v2 et v3 (obsolÚtes et remplacés par TLS)
SSLProtocol All -SSLv3 -SSLv2
# On active les méthodes de chiffrement, et on désactive les méthodes de chiffrement non sécurisés (par la présente d'un !)
SSLCipherSuite HIGH:!aNULL:!MD5:!ADH:!RC4:!DH
# On demande au navigateur de sélectionner une méthode de chiffrement en respectant l'ordre envoyée par le serveur (HIGH uniquement)
SSLHonorCipherOrder on
# On renseigne le chemin vers le certificat SSL de l'adresse à sécuriser
SSLCertificateFile "/etc/letsencrypt/live/monsite.ddns.net/fullchain.pem"
# On renseigne le chemin vers la clée privée correspondant au certificat SSL de l'adresse à sécuriser
SSLCertificateKeyFile "/etc/letsencrypt/live/monsite.ddns.net/privkey.pem"
# On renseigne le chemin vers le certificat SSL racine, puis vers le(s) certificat(s) SSL intermédiaire(s).
SSLCACertificateFile "/etc/letsencrypt/live/monsite.ddns.net/fullchain.pem"
# Si vous disposez de plusieurs certificats intermédiaires, vous pouvez ajouter d'autres directives SSLCACertificateFile.
Header always set Strict-Transport-Security "max-age=15768000"
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet