From b88b437308ff5d6bc504dabf9b69153db89f5b10 Mon Sep 17 00:00:00 2001 From: Andreas Thienemann Date: Thu, 16 Jul 2020 20:36:49 +0200 Subject: [PATCH] feat(vhosts/standard): add support for ScriptAlias in standard vhost The standard vhost currently handles a regular Alias configuration statement, but not the related ScriptAlias. Add this. --- apache/vhosts/standard.tmpl | 4 ++++ pillar.example | 3 +++ 2 files changed, 7 insertions(+) diff --git a/apache/vhosts/standard.tmpl b/apache/vhosts/standard.tmpl index ed662df..17f9ef9 100644 --- a/apache/vhosts/standard.tmpl +++ b/apache/vhosts/standard.tmpl @@ -78,6 +78,10 @@ Alias {{ loc }} {{ path }} {%- endfor %} + {%- for loc, path in site.get('ScriptAlias', {}).items() %} + ScriptAlias {{ loc }} {{ path }} + {%- endfor %} + {%- for path, dir in site.get('Directory', {}).items() -%} {%- set dvals = { 'Options': dir.get('Options', vals.Directory.Options), diff --git a/pillar.example b/pillar.example index 73ced33..5db4254 100644 --- a/pillar.example +++ b/pillar.example @@ -284,6 +284,9 @@ apache: Alias: /docs: /usr/share/docs + ScriptAlias: + /cgi-bin/: /var/www/cgi-bin/ + Formula_Append: | Additional config as a multi-line string here