diff --git a/HowtoApache.md b/HowtoApache.md index 1910cf39..71c34c97 100644 --- a/HowtoApache.md +++ b/HowtoApache.md @@ -214,19 +214,19 @@ Exemple pour générer un certificat auto-signé : La configuration d'un VirtualHost pour HTTPS pourra ainsi ressembler à : ~~~{.apache} - + ServerName secure.example.com ServerAlias www.example.com example.com - RewriteEngine On - RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R=permanent] - - -[...] + SSLEngine on SSLProtocol all -SSLv2 -SSLv3 SSLCertificateKeyFile /etc/ssl/private/private.key SSLCertificateFile /etc/ssl/certs/certificate.crt #SSLCertificateChainFile /etc/ssl/certs/certificates_chain.pem + + RewriteEngine On + RewriteCond %{HTTPS} !=on + RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R=permanent] ~~~