mirror of
https://github.com/linuxserver/reverse-proxy-confs.git
synced 2025-08-22 14:23:48 -07:00
working homeassistant.subdomain.conf config file
Some headers seem to always be necessary. I also added a (commented out) way to configure this module, as on my side, I don't want my HA instance to be reachable solely over https -- I also want to be able to reach the instance locally even when the outside internet connection is down.
This commit is contained in:
parent
d2e845b3f9
commit
8cab3de7c4
1 changed files with 19 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
## Version 2021/05/18
|
## Version 2021-05-30
|
||||||
# make sure that your dns has a cname set for homeassistant and that your homeassistant container is not using a base url
|
# make sure that your dns has a cname set for homeassistant and that your homeassistant container is not using a base url
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
@ -17,6 +17,9 @@ server {
|
||||||
# enable for Authelia
|
# enable for Authelia
|
||||||
#include /config/nginx/authelia-server.conf;
|
#include /config/nginx/authelia-server.conf;
|
||||||
|
|
||||||
|
# in case the service is running on `host` networking
|
||||||
|
# set $upstream_IP <your.HA.instance.IP>
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# enable the next two lines for http auth
|
# enable the next two lines for http auth
|
||||||
#auth_basic "Restricted";
|
#auth_basic "Restricted";
|
||||||
|
@ -36,6 +39,13 @@ server {
|
||||||
set $upstream_proto http;
|
set $upstream_proto http;
|
||||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||||
|
|
||||||
|
# in case the service is running on `host` networking, use this instead:
|
||||||
|
# proxy_pass $upstream_proto://$upstream_IP:$upstream_port;
|
||||||
|
|
||||||
|
# these seem to be needed:
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api {
|
location /api {
|
||||||
|
@ -45,5 +55,13 @@ server {
|
||||||
set $upstream_port 8123;
|
set $upstream_port 8123;
|
||||||
set $upstream_proto http;
|
set $upstream_proto http;
|
||||||
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
|
||||||
|
|
||||||
|
# in case the service is running on `host` networking, use this instead:
|
||||||
|
# proxy_pass $upstream_proto://$upstream_IP:$upstream_port;
|
||||||
|
|
||||||
|
# these seem to be needed:
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue