update config
authorMichael Wallner <root@s201809.m6w6.name>
Sat, 9 Mar 2019 11:18:47 +0000 (12:18 +0100)
committerMichael Wallner <root@s201809.m6w6.name>
Sat, 9 Mar 2019 11:18:47 +0000 (12:18 +0100)
etc/apache2.conf

index c9cf3f82c936f565224cb4a635a68882397c26ac..ab96afadf3c4adc5fd01d3eb3e1670e723385e74 100644 (file)
@@ -3,21 +3,37 @@
        ServerAlias www.m6w6.name
        ServerAdmin webmaster@m6w6.name
 
-       DocumentRoot /var/www/m6w6
+       DocumentRoot /var/www/m6w6/public
 
-       <Directory /var/www/m6w6>
-               Options Indexes FollowSymLinks MultiViews
+       <Directory /var/www/m6w6/public>
                AllowOverride None
                Require all granted
        </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
        RedirectPermanent / https://m6w6.name/
 </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"