aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/mw-backend/files/etc/apache2/sites-enabled/000-default.conf
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/mw-backend/files/etc/apache2/sites-enabled/000-default.conf')
-rw-r--r--ansible/roles/mw-backend/files/etc/apache2/sites-enabled/000-default.conf56
1 files changed, 56 insertions, 0 deletions
diff --git a/ansible/roles/mw-backend/files/etc/apache2/sites-enabled/000-default.conf b/ansible/roles/mw-backend/files/etc/apache2/sites-enabled/000-default.conf
new file mode 100644
index 0000000..3823cf1
--- /dev/null
+++ b/ansible/roles/mw-backend/files/etc/apache2/sites-enabled/000-default.conf
@@ -0,0 +1,56 @@
+# Based on /etc/apache2/conf-available/mediawiki.conf
+
+<VirtualHost *:80>
+ ServerName mw.trygvis.io
+
+ ServerAdmin webmaster@trygvis.io
+ DocumentRoot /var/lib/mediawiki
+
+ ErrorLog ${APACHE_LOG_DIR}/error.log
+ CustomLog ${APACHE_LOG_DIR}/access.log combined
+
+<Directory /var/lib/mediawiki/>
+ Options +FollowSymLinks
+ AllowOverride All
+ <IfVersion >= 2.3>
+ Require all granted
+ </IfVersion>
+ <IfVersion < 2.3>
+ order allow,deny
+ allow from all
+ </IfVersion>
+</Directory>
+
+# some directories must be protected
+<Directory /var/lib/mediawiki/config>
+ Options -FollowSymLinks
+ AllowOverride None
+ <IfModule mod_php7.c>
+ php_admin_flag engine off
+ </IfModule>
+ <IfModule mod_php5.c>
+ php_admin_flag engine off
+ </IfModule>
+</Directory>
+<Directory /var/lib/mediawiki/images>
+ Options -FollowSymLinks
+ AllowOverride None
+ <IfModule mod_php7.c>
+ php_admin_flag engine off
+ </IfModule>
+ <IfModule mod_php5.c>
+ php_admin_flag engine off
+ </IfModule>
+</Directory>
+<Directory /var/lib/mediawiki/upload>
+ Options -FollowSymLinks
+ AllowOverride None
+ <IfModule mod_php7.c>
+ php_admin_flag engine off
+ </IfModule>
+ <IfModule mod_php5.c>
+ php_admin_flag engine off
+ </IfModule>
+</Directory>
+</VirtualHost>
+# vim: syntax=apache ts=4 sw=4 sts=4 sr noet