From b9de7c75fe9969c1682119358e6bf519c89739d4 Mon Sep 17 00:00:00 2001 From: Andrea Cimbalo Date: Sun, 23 Sep 2018 19:44:28 +0200 Subject: [PATCH] role nginx: add options for proxy directive and additional root location configuration --- roles/nginx/templates/service.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/nginx/templates/service.conf b/roles/nginx/templates/service.conf index c73a377..e2a2c85 100644 --- a/roles/nginx/templates/service.conf +++ b/roles/nginx/templates/service.conf @@ -12,7 +12,9 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Frame-Options SAMEORIGIN; - proxy_pass {{ remote_host | default("http://127.0.0.1:8080") }}; + {{ proxy_type | default("proxy_pass") }} {{ remote_host | default("http://127.0.0.1:8080") }}; + {% block root %} + {% endblock %} } {% endblock %}