From d87c644a1d10865d013e0a7fce9b5e048409af64 Mon Sep 17 00:00:00 2001 From: helmo Date: Thu, 16 Feb 2017 14:55:18 +0100 Subject: [PATCH] Issue #2759735 by helmo, Grimreaper: Rename apache config files to .conf --- http/Provision/Config/Apache/server.tpl.php | 20 ++++++++++++++++---- http/Provision/Config/Http/Site.php | 7 ++++++- provision.api.php | 7 +++++++ 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/http/Provision/Config/Apache/server.tpl.php b/http/Provision/Config/Apache/server.tpl.php index 621e7ac13..5efa19db8 100644 --- a/http/Provision/Config/Apache/server.tpl.php +++ b/http/Provision/Config/Apache/server.tpl.php @@ -17,18 +17,30 @@ LoadModule rewrite_module modules/mod_rewrite.so + + # other configuration, not touched by aegir # this allows you to override aegir configuration, as it is included before -Include + # virtual hosts -Include + # platforms -Include + # other configuration, not touched by aegir # this allows to have default (for example during migrations) that are eventually overriden by aegir -Include + diff --git a/http/Provision/Config/Http/Site.php b/http/Provision/Config/Http/Site.php index b3292342c..35c702625 100644 --- a/http/Provision/Config/Http/Site.php +++ b/http/Provision/Config/Http/Site.php @@ -11,7 +11,12 @@ class Provision_Config_Http_Site extends Provision_Config_Http { function filename() { - return $this->data['http_vhostd_path'] . '/' . $this->uri; + if (drush_get_option('provision_apache_conf_suffix', FALSE)) { + return $this->data['http_vhostd_path'] . '/' . $this->uri . '.conf'; + } + else { + return $this->data['http_vhostd_path'] . '/' . $this->uri; + } } function process() { diff --git a/provision.api.php b/provision.api.php index 3f491ff92..3731e0f38 100644 --- a/provision.api.php +++ b/provision.api.php @@ -14,8 +14,15 @@ * $options['provision_backup_suffix'] = '.tar.bz2'; * * provision_verify_platforms_before_migrate - When migrating many sites turning this off can save time, default TRUE. + * * provision_backup_suffix - Method to set the compression used for backups... e.g. '.tar.bz2' or '.tar.', defaults to '.tar.gz'. * + * provision_apache_conf_suffix + * Set to TRUE to generate apache vhost files with a .conf suffix, default FALSE. + * This takes advantage of the IncludeOptional statment introduced in Apache 2.3.6. + * WARNING: After turning this on you need to re-verify all your sites, then then servers, + * and then cleanup the old configfiles (those without the .conf suffix). + * */ /**