Created
February 24, 2014 15:31
-
-
Save bobmaerten/9190472 to your computer and use it in GitHub Desktop.
Redirection :80 -> :443
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> | |
ServerName plop | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName plop | |
SSLCertificateFile /etc/apache2/ssl/plop.pem | |
SSLCertificateKeyFile /etc/apache2/ssl/plop.key | |
ErrorLog /var/log/apache2/plop-error.log | |
LogLevel warn | |
CustomLog /var/log/apache2/plop.log combined | |
ServerSignature Off | |
DocumentRoot /var/www/plop | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment