Forked from slashbinslashnoname/http_to_https_apache_httpd_configuration.vhost
Created
August 26, 2016 15:22
-
-
Save Jimgitsit/7e86ed02cc056202468ec0935cc7280b to your computer and use it in GitHub Desktop.
HTTP vers HTTPS - ledroideenchaine.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
RewriteEngine on | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R] | |
</VirtualHost> | |
<VirtualHost *:443> | |
SSLEngine on | |
SSLCertificateFile /etc/letsencrypt/live/mondomaine.com/cert.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/mondomaine.com/privkey.pem | |
SSLCACertificateFile /etc/letsencrypt/live/mondomaine.com/fullchain.pem | |
RewriteEngine on | |
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) | |
RewriteRule .* - [F] | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment