nginx: enable http2 when the OS supports it.

This commit is contained in:
Andrea Dell'Amico 2020-07-21 15:59:24 +02:00
parent 6197662fee
commit 9ea3a30b9f
2 changed files with 1 additions and 7 deletions

View File

@ -87,8 +87,6 @@ nginx_basic_auth_users: []
nginx_webroot: /usr/share/nginx/html
nginx_letsencrypt_managed: True
nginx_websockets_support: False
# Set it to 'ssl http2' if the nginx version supports it
nginx_ssl_type: ssl
# When we do not use letsencrypt:
# nginx_ssl_cert_file: '{{ pki_dir }}/certs/nginx.crt'
# nginx_ssl_cert_key: '{{ pki_dir }}/keys/nginx.key'

View File

@ -187,11 +187,7 @@ server {
{% if item.ssl_enabled %}
server {
{% if item.https_port is defined %}
listen {{ item.https_port }} {{ nginx_ssl_type }};
{% else %}
listen {{ https_port | default('443') }} {{ nginx_ssl_type }};
{% endif %}
listen {% if item.https_port is defined %} {{ item.https_port }} {% else %} {{ https_port | default('443') }} {% endif %} ssl {% if ansible_distribution_release != "trusty" %} http2{% endif %};
server_name {{ item.server_name }} {% if item.serveraliases is defined %}{{ item.serveraliases }}{% endif %};
{% if item.access_log is defined %}