Commit f299825a authored by Joshua Tauberer's avatar Joshua Tauberer

in the nginx override YAML file, change how proxies are specified into a mapping

parent 04454b35
...@@ -97,8 +97,8 @@ def make_domain_config(domain, template, template_for_primaryhost, env): ...@@ -97,8 +97,8 @@ def make_domain_config(domain, template, template_for_primaryhost, env):
yaml = rtyaml.load(open(nginx_conf_custom_fn)) yaml = rtyaml.load(open(nginx_conf_custom_fn))
if domain in yaml: if domain in yaml:
yaml = yaml[domain] yaml = yaml[domain]
if "proxy" in yaml: for path, url in yaml.get("proxies", {}).items():
nginx_conf += "\tlocation / {\n\t\tproxy_pass %s;\n\t}\n" % yaml["proxy"] nginx_conf += "\tlocation %s {\n\t\tproxy_pass %s;\n\t}\n" % (path, url)
# Ending. # Ending.
nginx_conf += nginx_conf_parts[1] nginx_conf += nginx_conf_parts[1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment