From 5d2722600140cc2b1bb8c8d19c5bcf53f4b051db Mon Sep 17 00:00:00 2001 From: Alexander Weidinger Date: Tue, 27 Sep 2016 02:00:41 +0200 Subject: [PATCH] FreeBSD: global DocumentRoot --- apache/files/FreeBSD/apache-2.4.config.jinja | 6 ++++-- apache/map.jinja | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apache/files/FreeBSD/apache-2.4.config.jinja b/apache/files/FreeBSD/apache-2.4.config.jinja index 77a8e2c..0625ff7 100644 --- a/apache/files/FreeBSD/apache-2.4.config.jinja +++ b/apache/files/FreeBSD/apache-2.4.config.jinja @@ -230,13 +230,14 @@ ServerAdmin root@localhost # below. # +{% if apache.global_document_root is defined and apache.global_document_root|length > 0 %} # # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # -DocumentRoot "/usr/local/www/apache24/data" - +DocumentRoot "{{ apache.global_document_root }}" + # # Possible values for the Options directive are "None", "All", # or any combination of: @@ -263,6 +264,7 @@ DocumentRoot "/usr/local/www/apache24/data" # Require all granted +{% endif %} # # DirectoryIndex: sets the file that Apache will serve if a directory diff --git a/apache/map.jinja b/apache/map.jinja index 5bda047..e31416e 100644 --- a/apache/map.jinja +++ b/apache/map.jinja @@ -90,6 +90,8 @@ 'vhostdir': '/usr/local/etc/apache22/Includes', 'confdir': '/usr/local/etc/apache22/Includes', 'modulesdir': '/usr/local/etc/apache22/modules.d', + 'global_document_root': '/usr/local/www/apache22/data', + 'confext': '', 'default_site': 'default', 'default_site_ssl': 'default-ssl',