etc/apache2.conf: macro update master
authorMichael Wallner <root@s201809.m6w6.name>
Mon, 25 Mar 2019 13:07:24 +0000 (14:07 +0100)
committerMichael Wallner <root@s201809.m6w6.name>
Mon, 25 Mar 2019 13:07:24 +0000 (14:07 +0100)
etc/apache2.conf

index ab96afadf3c4adc5fd01d3eb3e1670e723385e74..bf9784b0f98e095f4567437fbdfce30b0662dc88 100644 (file)
        </Directory>
 </Macro>
 
        </Directory>
 </Macro>
 
-<VirtualHost _default_:80>
-       Use m6w6_host_defs
-       <Location "/server-status">
-               Define NO_SSL_REDIRECT
-       </Location>
-       <IfDefine !NO_SSL_REDIRECT>
-               RedirectPermanent / https://m6w6.name/
-       </IfDefine>
-</VirtualHost>
 <VirtualHost *:80>
        Use m6w6_host_defs
 <VirtualHost *:80>
        Use m6w6_host_defs
-       RedirectPermanent / https://m6w6.name/
+       Use ssl_redirect
 </VirtualHost>
 
 </VirtualHost>
 
-<IfModule mod_ssl.c>
-       <VirtualHost _default_:443>
-               Use m6w6_host_defs
-               Include "bits/hsts-nosub"
-               SSLEngine on
-               SSLUseStapling on
-               SSLCertificateFile /etc/letsencrypt/live/m6w6.name/fullchain.pem
-               SSLCertificateKeyFile /etc/letsencrypt/live/m6w6.name/privkey.pem
-       </VirtualHost>
-       <VirtualHost *:443>
-               Use m6w6_host_defs
-               Include "bits/hsts-nosub"
-               SSLEngine on
-               SSLUseStapling on
-               SSLCertificateFile /etc/letsencrypt/live/m6w6.name/fullchain.pem
-               SSLCertificateKeyFile /etc/letsencrypt/live/m6w6.name/privkey.pem
-       </VirtualHost>
-</IfModule>
+<VirtualHost *:443>
+       Use m6w6_host_defs
+       Use ssl_defs "m6w6.name" "hsts_nosub"
+</VirtualHost>
 
 # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
 
 # vim: syntax=apache ts=4 sw=4 sts=4 sr noet