1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-25 07:47:05 +00:00

Default conf: don't repeat the upstream php conf

This commit is contained in:
David Duque 2020-04-20 20:01:19 +01:00
parent 502a4d2128
commit ab9dbdf270
No known key found for this signature in database
GPG Key ID: 2F327738A3C0AE3A

View File

@ -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.