diff --git a/templates/nginx/nginx.conf.tpl b/templates/nginx/nginx.conf.tpl index 64d36bc..7771f8e 100644 --- a/templates/nginx/nginx.conf.tpl +++ b/templates/nginx/nginx.conf.tpl @@ -14,9 +14,10 @@ server { proxy_set_header [[ $header ]] ""; [[- end ]] + proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; - proxy_http_version 1.1; + proxy_set_header Host $host; proxy_socket_keepalive on; client_max_body_size 100m; @@ -29,7 +30,6 @@ server { if ($request_method !~ ^(GET|HEAD|POST)$ ) { return 405; } - proxy_set_header Host "[[ (urlParse .unifi.inform.public_url).Hostname ]]"; proxy_pass http://localhost:8080; } @@ -38,7 +38,6 @@ server { if ($request_method !~ ^(GET|HEAD|POST)$ ) { return 405; } - proxy_set_header Host "[[ (urlParse .unifi.guest_portal.public_url).Hostname ]]"; proxy_pass https://localhost:8843; } @@ -47,7 +46,6 @@ server { if ($request_method !~ ^(GET|HEAD|POST|PUT|DELETE)$ ) { return 405; } - proxy_set_header Host "[[ (urlParse .unifi.controller.public_url).Hostname ]]"; proxy_pass https://localhost:8443; } }