From a97a992a9cf0e3e6f7976a16f1b0393f9db94828 Mon Sep 17 00:00:00 2001 From: Christian Schnidrig Date: Fri, 19 Apr 2019 15:13:22 +0200 Subject: [PATCH] improved nginx config --- roles/openhab2/templates/nginx.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/openhab2/templates/nginx.conf.j2 b/roles/openhab2/templates/nginx.conf.j2 index e377095..dbd7599 100644 --- a/roles/openhab2/templates/nginx.conf.j2 +++ b/roles/openhab2/templates/nginx.conf.j2 @@ -4,6 +4,7 @@ server { return 301 https://$server_name$request_uri; } server { + #listen [::]:80; listen [::]:443 ssl; server_name {{fqdn}}; @@ -18,6 +19,7 @@ server { location / { proxy_pass http://localhost:8080/; + proxy_redirect http:// https://; proxy_buffering off; # openHAB supports non-buffering specifically for SSEs now proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; @@ -32,3 +34,5 @@ server { } } + +