Trying to set up an nginx https reverse proxy to home assistant, this works:
...
location / {
proxy_pass http://127.0.0.1:8123;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
But I would like to access it from a non-root url like home.local/ha
. Similar to the goals of this question's asker. I have tried all of the answers on that thread, but none seem to allow the websockets to connect (I think). An example of something I tried:
...
location = /ha {
return 302 /ha/;
}
location /ha/ {
proxy_pass http://127.0.0.1:8123/;
#proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
Any Ideas how I can get this to work?