summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Porte <microjoe@microjoe.org>2017-08-05 14:05:17 +0200
committerRomain Porte <microjoe@microjoe.org>2017-08-05 14:05:17 +0200
commit919972105fb9f379735ca4188bad03d3b8d1f7bb (patch)
treed79166a9a18cadb0e55907f03982d82dea06d726
parentc32f627ad4ee38d4fb1027cd5bf1476727bff3a1 (diff)
downloadMicroJoe.nginx-staticwebsite-919972105fb9f379735ca4188bad03d3b8d1f7bb.tar.gz
MicroJoe.nginx-staticwebsite-919972105fb9f379735ca4188bad03d3b8d1f7bb.zip
Added http2 support for https
-rw-r--r--defaults/main.yml2
-rw-r--r--templates/nginx.j24
2 files changed, 4 insertions, 2 deletions
diff --git a/defaults/main.yml b/defaults/main.yml
index f993d36..42b4fcd 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -7,6 +7,8 @@ nginx_rewrite_html: false
nginx_customize: ""
nginx_auth_file: ""
+enable_http2: true
+
letsencrypt_wellknown: /var/www/letsencrypt
letsencrypt_activate: false
letsencrypt_https: false
diff --git a/templates/nginx.j2 b/templates/nginx.j2
index 184f912..328ec7c 100644
--- a/templates/nginx.j2
+++ b/templates/nginx.j2
@@ -20,8 +20,8 @@ server {
}
server {
- listen 443 ssl;
- listen [::]:443 ssl;
+ listen 443 ssl {% if enable_http2 %}http2{% endif %};
+ listen [::]:443 ssl {% if enable_http2 %}http2{% endif %};
server_name {{ nginx_domain }};
access_log /var/log/nginx/{{ nginx_domain }}.access.log;