Use http2 directive
This commit is contained in:
parent
b00e74d1c1
commit
0ded5a8528
1 changed files with 10 additions and 8 deletions
|
|
@ -47,12 +47,12 @@ server {
|
|||
{% if nginx_listen443 is defined %}
|
||||
{{ nginx_listen443 }}
|
||||
{% else %}
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
{% if proxy_protocol is defined %}
|
||||
|
||||
listen 442 ssl http2 proxy_protocol;
|
||||
listen [::]:442 ssl http2 proxy_protocol;
|
||||
listen 442 ssl proxy_protocol;
|
||||
listen [::]:442 ssl proxy_protocol;
|
||||
real_ip_header proxy_protocol;
|
||||
{% for ip in proxy_protocol.ipv4 %}
|
||||
set_real_ip_from {{ ip }};
|
||||
|
|
@ -64,6 +64,7 @@ server {
|
|||
port_in_redirect off;
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
http2 on;
|
||||
server_name {% if redirect_to_first is not defined or not redirect_to_first %}{{ domains | join(' ') }}{% else %}{{ domains[0] }}{% endif %};
|
||||
|
||||
{% if ssl_certificate is defined -%}
|
||||
|
|
@ -93,12 +94,12 @@ server {
|
|||
{% if nginx_listen443 is defined -%}
|
||||
{{ nginx_listen443 }}
|
||||
{% else %}
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
{% if proxy_protocol is defined %}
|
||||
|
||||
listen 442 ssl http2 proxy_protocol;
|
||||
listen [::]:442 ssl http2 proxy_protocol;
|
||||
listen 442 ssl proxy_protocol;
|
||||
listen [::]:442 ssl proxy_protocol;
|
||||
real_ip_header proxy_protocol;
|
||||
{% for ip in proxy_protocol.ipv4 %}
|
||||
set_real_ip_from {{ ip }};
|
||||
|
|
@ -110,6 +111,7 @@ server {
|
|||
port_in_redirect off;
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
http2 on;
|
||||
server_name {{ domains[1:] | join(' ') }};
|
||||
|
||||
{% if ssl_certificate is defined %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue