library/roles/nginx: Add a configuration snippet to support websocket reverse proxy.

This commit is contained in:
Andrea Dell'Amico 2016-09-21 17:49:13 +02:00
parent 309bf1e15c
commit 978542e261
3 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,7 @@ nginx_ldap_base_dn: "dc=example,dc=org"
# nginx_ldap_login_attribute: uid
# nginx_ldap_pam_groupdn:
nginx_letsencrypt_managed: True
nginx_websockets_support: False
# Virtualhost example
# nginx_virthosts:

View File

@ -31,3 +31,9 @@
notify: Reload nginx
tags: [ 'nginx', 'nginx_conf' ]
- name: Install websockets configuration if enabled
template: src=nginx-websockets.conf.j2 dest=/etc/nginx/conf.d/websockets.conf owner=root group=root mode=0444
when: nginx_websockets_support
notify: Reload nginx
tags: [ 'nginx', 'nginx_conf' ]

View File

@ -0,0 +1,4 @@
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}