From 78ee7ff8eec066553fe1334efe9ee0f225df68d0 Mon Sep 17 00:00:00 2001 From: Thomas Steinert Date: Tue, 3 Jun 2014 08:36:45 +0200 Subject: [PATCH] Change the site-include regexp to work better with Debian/Ubuntu as it is commonly used practice to omit the '.conf' part on vhost files. --- spec/classes/apache_spec.rb | 2 +- templates/httpd.conf.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/classes/apache_spec.rb b/spec/classes/apache_spec.rb index 3290f5b42..5bf9851d4 100644 --- a/spec/classes/apache_spec.rb +++ b/spec/classes/apache_spec.rb @@ -293,7 +293,7 @@ it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^IncludeOptional "/etc/httpd/conf\.d/\*\.conf"$} } end - it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/site\.d/\*\.conf"$} } + it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/site\.d/\*"$} } it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.conf"$} } it { should contain_file("/etc/httpd/conf/httpd.conf").with_content %r{^Include "/etc/httpd/mod\.d/\*\.load"$} } end diff --git a/templates/httpd.conf.erb b/templates/httpd.conf.erb index c73a33dfc..cac3aaf10 100644 --- a/templates/httpd.conf.erb +++ b/templates/httpd.conf.erb @@ -67,7 +67,7 @@ IncludeOptional "<%= @confd_dir %>/*.conf" Include "<%= @confd_dir %>/*.conf" <%- end -%> <% if @vhost_load_dir != @confd_dir -%> -Include "<%= @vhost_load_dir %>/*.conf" +Include "<%= @vhost_load_dir %>/*" <% end -%> <% if @error_documents -%>