library/roles/nginx/templates/nginx-virthost.j2: Work around a problem with the websockets attivation.

This commit is contained in:
Andrea Dell'Amico 2018-12-10 17:02:04 +01:00
parent 5232212ecb
commit 572c94edf4
1 changed files with 8 additions and 0 deletions

View File

@ -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 { server {
listen {{ item.http_port | default ('80') }}; listen {{ item.http_port | default ('80') }};
server_name {{ item.server_name }} {% if item.serveraliases is defined %}{{ item.serveraliases }}{% endif %}; server_name {{ item.server_name }} {% if item.serveraliases is defined %}{{ item.serveraliases }}{% endif %};