From 592e808593b1b5651b7130cab8122a2ab0b7df7e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 10 Jun 2014 12:52:52 +0100 Subject: [PATCH] Apache site files need to end with .conf on 14.04 --- cookbooks/apache/providers/site.rb | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/cookbooks/apache/providers/site.rb b/cookbooks/apache/providers/site.rb index 1b13a3d02..86fecbfcf 100644 --- a/cookbooks/apache/providers/site.rb +++ b/cookbooks/apache/providers/site.rb @@ -68,15 +68,28 @@ def site_directory end def available_name - "/etc/apache2/sites-available/#{new_resource.name}" + if node[:lsb][:release].to_f >= 14.04 + "/etc/apache2/sites-available/#{new_resource.name}.conf" + else + "/etc/apache2/sites-available/#{new_resource.name}" + end end def enabled_name - case new_resource.name - when "default" - "/etc/apache2/sites-enabled/000-default" + if node[:lsb][:release].to_f >= 14.04 + case new_resource.name + when "default" + "/etc/apache2/sites-enabled/000-default.conf" + else + "/etc/apache2/sites-enabled/#{new_resource.name}.conf" + end else - "/etc/apache2/sites-enabled/#{new_resource.name}" + case new_resource.name + when "default" + "/etc/apache2/sites-enabled/000-default" + else + "/etc/apache2/sites-enabled/#{new_resource.name}" + end end end -- 2.39.5