mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
fix reverse proxy for HA
This commit is contained in:
parent
26fba44457
commit
2567f8703c
@ -118,9 +118,6 @@
|
|||||||
"rss.tstarr.us" = (SSL // {
|
"rss.tstarr.us" = (SSL // {
|
||||||
locations."/".proxyPass = "http://localhost:8087/";
|
locations."/".proxyPass = "http://localhost:8087/";
|
||||||
});
|
});
|
||||||
"home.tstarr.us" = (SSL // {
|
|
||||||
locations."/".proxyPass = "http://localhost:8123/";
|
|
||||||
});
|
|
||||||
"media.tstarr.us" = (SSL // {
|
"media.tstarr.us" = (SSL // {
|
||||||
locations."/".proxyPass = "http://localhost:8096/";
|
locations."/".proxyPass = "http://localhost:8096/";
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,30 @@
|
|||||||
# Includes dependencies for a basic setup
|
# Includes dependencies for a basic setup
|
||||||
# https://www.home-assistant.io/integrations/default_config/
|
# https://www.home-assistant.io/integrations/default_config/
|
||||||
default_config = {};
|
default_config = {};
|
||||||
|
http = {
|
||||||
|
use_x_forwarded_for = true;
|
||||||
|
trusted_proxies = [
|
||||||
|
"127.0.0.1"
|
||||||
|
"::1"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."home.tstarr.us" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
extraConfig = ''
|
||||||
|
proxy_buffering off;
|
||||||
|
'';
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
proxy_pass http://localhost:8123;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_redirect http:// https://;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user