nginx: enable http2 when the OS supports it.
This commit is contained in:
parent
6197662fee
commit
9ea3a30b9f
|
@ -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'
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue