add apache2.conf
authorMichael Wallner <mike@php.net>
Fri, 8 Mar 2019 10:39:37 +0000 (11:39 +0100)
committerMichael Wallner <mike@php.net>
Fri, 8 Mar 2019 10:39:40 +0000 (11:39 +0100)
etc/apache2.conf [new file with mode: 0644]

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