From 19ddc34cbbafa165d4fd2fd73f7cd09b75c08349 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 25 Dec 2015 19:42:17 +0000 Subject: [PATCH] Only add root if it's defined --- templates/vhosts.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/vhosts.j2 b/templates/vhosts.j2 index 4f9e198..94611bf 100644 --- a/templates/vhosts.j2 +++ b/templates/vhosts.j2 @@ -3,7 +3,10 @@ server { listen {{ vhost.listen | default('80 default_server') }}; server_name {{ vhost.server_name }}; + {% if vhost.root is defined %} root {{ vhost.root }}; + {% endif %} + index {{ vhost.index | default('index.html index.htm') }}; {% if vhost.error_page is defined %}