From b6fe515ed8b4f042f8168f61885628ca1003412a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Paw=C5=82owski?= Date: Wed, 22 Jul 2015 14:36:25 +0200 Subject: [PATCH] RedHat fixes: change default vhostdir to redhat official default /etc/httpd/vhosts.d, add state for ensuring that vhostdir exists, include vhosts.d/*.conf in httpd.conf --- apache/config.sls | 7 +++++++ apache/files/RedHat/apache.config.jinja | 1 + apache/map.jinja | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apache/config.sls b/apache/config.sls index f4faa20..4fd525b 100644 --- a/apache/config.sls +++ b/apache/config.sls @@ -13,6 +13,13 @@ include: - watch_in: - service: apache +{{ apache.vhostdir }}: + file.directory: + - require: + - pkg: apache + - watch_in: + - service: apache + {% if grains['os_family']=="Debian" %} /etc/apache2/envvars: file.managed: diff --git a/apache/files/RedHat/apache.config.jinja b/apache/files/RedHat/apache.config.jinja index 647059a..ef067bd 100644 --- a/apache/files/RedHat/apache.config.jinja +++ b/apache/files/RedHat/apache.config.jinja @@ -354,3 +354,4 @@ EnableSendfile on # # Load config files in the "/etc/httpd/conf.d" directory, if any. IncludeOptional conf.d/*.conf +IncludeOptional vhosts.d/*.conf diff --git a/apache/map.jinja b/apache/map.jinja index 8f358d9..7ce2ba5 100644 --- a/apache/map.jinja +++ b/apache/map.jinja @@ -25,7 +25,7 @@ 'mod_wsgi': 'mod_wsgi', 'mod_php5': 'php', - 'vhostdir': '/etc/httpd/conf.d', + 'vhostdir': '/etc/httpd/vhosts.d', 'confdir': '/etc/httpd/conf.d', 'confext': '.conf', 'default_site': 'default',