From f299825a9547762f8ad76ec15bea40534f677ad5 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 16 Aug 2014 17:43:55 +0000 Subject: [PATCH] in the nginx override YAML file, change how proxies are specified into a mapping --- management/web_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/management/web_update.py b/management/web_update.py index 3ef2856..204d0bb 100644 --- a/management/web_update.py +++ b/management/web_update.py @@ -97,8 +97,8 @@ def make_domain_config(domain, template, template_for_primaryhost, env): yaml = rtyaml.load(open(nginx_conf_custom_fn)) if domain in yaml: yaml = yaml[domain] - if "proxy" in yaml: - nginx_conf += "\tlocation / {\n\t\tproxy_pass %s;\n\t}\n" % yaml["proxy"] + for path, url in yaml.get("proxies", {}).items(): + nginx_conf += "\tlocation %s {\n\t\tproxy_pass %s;\n\t}\n" % (path, url) # Ending. nginx_conf += nginx_conf_parts[1]