From f6f4d542aef14c4b5c8795a8c959d4a5bc578f8b Mon Sep 17 00:00:00 2001 From: Philippe PITTOLI Date: Sat, 2 Nov 2019 22:14:08 +0100 Subject: [PATCH] nginx: new template --- templates/nginx.conf.j2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index b1d2f5a..d313006 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -21,10 +21,10 @@ http { server_tokens off; - {% for user in consumers["www"] %} + {% for user in consumers.www %} server { - listen {{ port(service.id) }} ; - listen [::]:{{ port(service.id) }} ; + listen {{ service.ports.http }} ; + listen [::]:{{ service.ports.http }} ; server_name {{ user.domain }} ; location / { @@ -33,16 +33,16 @@ http { } {% endfor %} - {% for user in consumers["http"] %} + {% for user in consumers.http %} server { - listen {{ port(service.id) }}; - listen [::]:{{ port(service.id) }}; + listen {{ service.ports.http }}; + listen [::]:{{ service.ports.http }}; server_name {{ user.domain }} *.{{ user.domain }}; location / { proxy_set_header Host $host; proxy_next_upstream_timeout 2s; - proxy_pass http://127.0.0.1:{{ port(user.id) }}/; + proxy_pass http://127.0.0.1:{{ user.ports.http }}/; } } {% endfor %}