<Directory <%= @directory %>>
Options -Indexes
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all granted
+<% end -%>
</Directory>
<Directory <%= @mediawiki[:directory] %>/images/>
</Directory>
<Directory <%= @mediawiki[:directory] %>/maintenance/>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Directory>
<Files <%= @mediawiki[:directory] %>/LocalSettings.php>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Files>
<Directory <%= @mediawiki[:directory] %>/images/>
</Directory>
<Directory ~ "\.svn">
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Directory>
<Directory ~ "\.git">
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Directory>
<Files ~ "~$">
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Files>
</VirtualHost>
<% if @mediawiki[:enable_ssl] -%>
<Directory <%= @directory %>>
Options -Indexes
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all granted
+<% end -%>
</Directory>
<Directory <%= @mediawiki[:directory] %>/images/>
</Directory>
<Directory <%= @mediawiki[:directory] %>/maintenance/>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Directory>
<Files <%= @mediawiki[:directory] %>/LocalSettings.php>
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Files>
<Directory <%= @mediawiki[:directory] %>/images/>
</Directory>
<Directory ~ "\.svn">
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Directory>
<Directory ~ "\.git">
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Directory>
<Files ~ "~$">
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ Require all denied
+<% else -%>
Order allow,deny
Deny from all
+<% end -%>
</Files>
</VirtualHost>
<% end -%>