From e183ecaa64ce203c31a9a8b806e6f4c2e48d9f71 Mon Sep 17 00:00:00 2001 From: Wilco van Duinkerken Date: Fri, 21 Jul 2017 20:20:13 +0200 Subject: [PATCH] Add websocket proxy to / for nginx subdomain setup (#3020) Without the proxy_http_version and proxy_header upgrades an the nginx subdomain setup generates socket errors on the login page. This makes that users can't login. Adding the websocket lines both to the "/" location as well as the "/api/websocket" location solves the issue. Solution copied from: KickHackerz, mar 1 answer on https://community.home-assistant.io/t/ngnix-so-confused-doing-something-wrong/12736/3. --- source/_docs/ecosystem/nginx_subdomain.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_docs/ecosystem/nginx_subdomain.markdown b/source/_docs/ecosystem/nginx_subdomain.markdown index 2bc9413b7e4..ccc12832876 100644 --- a/source/_docs/ecosystem/nginx_subdomain.markdown +++ b/source/_docs/ecosystem/nginx_subdomain.markdown @@ -36,6 +36,10 @@ server { location / { proxy_pass http://localhost:8123/; proxy_set_header Host $host; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; } location /api/websocket {