From 018955bed8e0779d9c279eca693b9ea267331bf4 Mon Sep 17 00:00:00 2001
From: Falko Timme <ft@falkotimme.com>
Date: Wed, 12 Feb 2014 10:34:01 -0500
Subject: [PATCH] - Implemented FS#3308 - PATH placeholder in directive snippets (placeholder is named {DOCROOT}, like for nginx).

---
 server/plugins-available/apache2_plugin.inc.php |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 654c87a..aec93b9 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -892,6 +892,8 @@
 		// Make sure we only have Unix linebreaks
 		$vhost_data['apache_directives'] = str_replace("\r\n", "\n", $vhost_data['apache_directives']);
 		$vhost_data['apache_directives'] = str_replace("\r", "\n", $vhost_data['apache_directives']);
+		$trans = array('{DOCROOT}' => $vhost_data['web_document_root_www']);
+		$vhost_data['apache_directives'] = strtr($vhost_data['apache_directives'], $trans);
 
 		// Check if a SSL cert exists
 		$ssl_dir = $data['new']['document_root'].'/ssl';

--
Gitblit v1.9.1