add apache2.conf
[mdref/mdref.m6w6.name] / etc / apache2.conf
diff --git a/etc/apache2.conf b/etc/apache2.conf
new file mode 100644 (file)
index 0000000..b1e8fe6
--- /dev/null
@@ -0,0 +1,31 @@
+<Macro mdref_host_defs>
+       ServerName mdref.m6w6m.name
+       ServerAdmin webmaster@m6w6.name
+
+       DocumentRoot /var/www/mdref/mdref/public
+
+       <Directory /var/www/mdref/mdref/public>
+               Options Indexes FollowSymLinks
+               AllowOverride All
+               Require all granted
+       </Directory>
+</Macro>
+
+<VirtualHost *:80>
+       Use mdref_host_defs
+       <IfModule ssl_module>
+               Redirect permanent / https://mdref.m6w6.name/
+       </IfModule>
+</VirtualHost>
+
+<IfModule ssl_module>
+       <VirtualHost *:443>
+               Use mdref_host_defs
+               Include "bits/hsts"
+               SSLEngine on
+               SSLUseStapling on
+               SSLCertificateKeyFile /etc/letsencrypt/live/m6w6.name/privkey.pem
+               SSLCertificateFile /etc/letsencrypt/live/m6w6.name/fullchain.pem
+       </VirtualHost>
+</IfModule>
+# vim: syntax=apache ts=4 sw=4 sts=4 sr noet