From 26ece7a240fe842e5645a47bac86699c5d2bd34c Mon Sep 17 00:00:00 2001 From: varac Date: Sat, 12 Dec 2015 23:55:00 +0100 Subject: [bug] Use guess_apache_version in apache templates The apache_version() fact only works if apache is already installed. So we use the guess_apache_version() function from the apache module to determine which apache version is to be installed. - Resolves: #7681 --- .../site_apache/templates/vhosts.d/hidden_service.conf.erb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb') diff --git a/puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb b/puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb index 2c8d5eb5..653664ec 100644 --- a/puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb +++ b/puppet/modules/site_apache/templates/vhosts.d/hidden_service.conf.erb @@ -8,6 +8,12 @@ <% if (defined? @services) and (@services.include? 'webapp') -%> DocumentRoot /srv/leap/webapp/public + <% if scope.function_guess_apache_version([]) == '2.4' %> + + AllowOverride None + Require all granted + + <% end %> RewriteEngine On # Check for maintenance file and redirect all requests @@ -33,6 +39,12 @@ <% if (defined? @services) and (@services.include? 'static') -%> DocumentRoot "/srv/static/root/public" + <% if scope.function_guess_apache_version([]) == '2.4' %> + + AllowOverride None + Require all granted + + <% end %> AccessFileName .htaccess Alias /provider.json /srv/leap/provider.json -- cgit v1.2.3