From ab9dbdf270aebd42fcde9808678c2e4064c915f5 Mon Sep 17 00:00:00 2001 From: David Duque Date: Mon, 20 Apr 2020 20:01:19 +0100 Subject: [PATCH] Default conf: don't repeat the upstream php conf --- management/web_update.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/management/web_update.py b/management/web_update.py index 921aadcd..964f279b 100644 --- a/management/web_update.py +++ b/management/web_update.py @@ -82,11 +82,13 @@ def do_web_update(env): template4 = "\trewrite ^(.*) https://$REDIRECT_DOMAIN$1 permanent;\n" # Add the PRIMARY_HOST configuration first so it becomes nginx's default server. - nginx_conf += make_domain_config(env['PRIMARY_HOSTNAME'], [template0, template1, template2], ssl_certificates, env) + default_conf = make_domain_config(env['PRIMARY_HOSTNAME'], [template0, template1, template2], ssl_certificates, env) default_conf_file = os.path.join(get_web_root(env['PRIMARY_HOSTNAME'], env), ".nginx.conf") if not os.path.exists(default_conf_file): with open(default_conf_file, "w") as f: - f.write(nginx_conf) + f.write(default_conf) + + nginx_conf += default_conf # Add configuration all other web domains.