From b3aa2c6169217e5abbe2342c810505b917dcc080 Mon Sep 17 00:00:00 2001 From: nd Date: Wed, 29 Apr 2020 18:51:49 +0200 Subject: [PATCH] add support for custom locations --- README.md | 3 +++ templates/vhost.conf.j2 | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3cab406..de7aad6 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,9 @@ match: '' # an absolut unix path, only set if not none alias: None + +# Array of custom config strings to add to the vhost config, the ";" is added after every entry +custom: [] ``` **authconfig** diff --git a/templates/vhost.conf.j2 b/templates/vhost.conf.j2 index ce6a27e..22af355 100644 --- a/templates/vhost.conf.j2 +++ b/templates/vhost.conf.j2 @@ -57,7 +57,12 @@ server { {% for location in vhost.locations|default([]) %} location {{ location.match }} { - {% if location.alias %}alias {{ location.alias }};{% endif %} + {% if "alias" in location %} + alias {{ location.alias }}; + {% endif %} + {% for c in location.custom|default([]) %} + {{ c }}; + {% endfor %} } {% endfor %}