From 572c94edf460699c5761e50a9eb37d3024d9b0e1 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 10 Dec 2018 17:02:04 +0100 Subject: [PATCH] library/roles/nginx/templates/nginx-virthost.j2: Work around a problem with the websockets attivation. --- nginx/templates/nginx-virthost.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nginx/templates/nginx-virthost.j2 b/nginx/templates/nginx-virthost.j2 index 812cf2d..426d130 100644 --- a/nginx/templates/nginx-virthost.j2 +++ b/nginx/templates/nginx-virthost.j2 @@ -1,3 +1,11 @@ +{% if nginx_websockets_support is defined and nginx_websockets_support %} +include /etc/nginx/snippets/nginx-websockets.conf; +{% else %} +{% if item.websockets is defined and item.websockets %} +include /etc/nginx/snippets/nginx-websockets.conf; +{% endif %} +{% endif %} + server { listen {{ item.http_port | default ('80') }}; server_name {{ item.server_name }} {% if item.serveraliases is defined %}{{ item.serveraliases }}{% endif %};