|
|
|
@ -15,6 +15,17 @@ http { |
|
|
|
gzip_vary on; |
|
|
|
gzip_vary on; |
|
|
|
gzip_proxied any; |
|
|
|
gzip_proxied any; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
server { |
|
|
|
|
|
|
|
listen 80; |
|
|
|
|
|
|
|
server_name your_domain; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add Alt-Svc header to negotiate HTTP/3. |
|
|
|
|
|
|
|
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 301 https://$host$request_uri; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
server { |
|
|
|
server { |
|
|
|
# https://github.com/cloudflare/quiche/tree/master/extras/nginx |
|
|
|
# https://github.com/cloudflare/quiche/tree/master/extras/nginx |
|
|
|
# Enable QUIC and HTTP/3. |
|
|
|
# Enable QUIC and HTTP/3. |
|
|
|
@ -40,7 +51,7 @@ http { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# Add Alt-Svc header to negotiate HTTP/3. |
|
|
|
# Add Alt-Svc header to negotiate HTTP/3. |
|
|
|
add_header alt-svc 'h3-29=":443"; ma=86400'; |
|
|
|
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400'; |
|
|
|
|
|
|
|
|
|
|
|
location / { |
|
|
|
location / { |
|
|
|
root html; |
|
|
|
root html; |
|
|
|
|