2
0
mirror of https://github.com/schnidrig/openhab-ansible synced 2026-01-12 00:48:46 +01:00

improved nginx config

This commit is contained in:
Christian Schnidrig
2019-04-19 15:13:22 +02:00
parent d4dcdc7c0d
commit a97a992a9c

View File

@@ -4,6 +4,7 @@ server {
return 301 https://$server_name$request_uri; return 301 https://$server_name$request_uri;
} }
server { server {
#listen [::]:80;
listen [::]:443 ssl; listen [::]:443 ssl;
server_name {{fqdn}}; server_name {{fqdn}};
@@ -18,6 +19,7 @@ server {
location / { location / {
proxy_pass http://localhost:8080/; proxy_pass http://localhost:8080/;
proxy_redirect http:// https://;
proxy_buffering off; # openHAB supports non-buffering specifically for SSEs now proxy_buffering off; # openHAB supports non-buffering specifically for SSEs now
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
@@ -32,3 +34,5 @@ server {
} }
} }