X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/4f10eb951399adea7cd598b2d763969c735bc888..4c87577cb2b3d35abd3c833c88ad18ddcd64b3b0:/cookbooks/mediawiki/templates/default/apache.erb
diff --git a/cookbooks/mediawiki/templates/default/apache.erb b/cookbooks/mediawiki/templates/default/apache.erb
index 40e206d1b..b37ec1b0c 100644
--- a/cookbooks/mediawiki/templates/default/apache.erb
+++ b/cookbooks/mediawiki/templates/default/apache.erb
@@ -48,6 +48,9 @@
>
Options -Indexes
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all granted
+<% end -%>
/images/>
@@ -55,6 +58,15 @@
php_admin_flag engine off
Options -ExecCGI -Includes -Indexes
AllowOverride None
+ AddType text/plain .html .htm .shtml
+<% if @mediawiki[:private] -%>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
+ Order allow,deny
+ Deny from all
+<% end -%>
+<% end -%>
/images/thumb/>
@@ -78,22 +90,23 @@
/maintenance/>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
/LocalSettings.php>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
- /images/>
- Options -ExecCGI -Includes -Indexes
- AllowOverride None
- AddType text/plain .html .htm .shtml
- php_admin_flag engine off
-
-
/cache/>
Options -ExecCGI -Includes -Indexes
AllowOverride None
@@ -102,18 +115,30 @@
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
<% if @mediawiki[:enable_ssl] -%>
@@ -167,6 +192,9 @@
>
Options -Indexes
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all granted
+<% end -%>
/images/>
@@ -174,6 +202,14 @@
php_admin_flag engine off
Options -ExecCGI -Includes -Indexes
AllowOverride None
+<% if @mediawiki[:private] -%>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
+ Order allow,deny
+ Deny from all
+<% end -%>
+<% end -%>
/images/thumb/>
@@ -189,13 +225,21 @@
/maintenance/>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
/LocalSettings.php>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
/images/>
@@ -213,18 +257,30 @@
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
<% end -%>