Better proxy

This commit is contained in:
Filippo Berto 2022-12-19 23:45:42 +01:00
parent 58e14f0dad
commit be8556af54
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED

View file

@ -58,7 +58,15 @@ with lib; {
virtualHosts = let ssl = { enableACME = true; forceSSL = true; }; in
{
"unimi.bertof.net" = ssl // { locations."/".extraConfig = "rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;"; };
"home-assistant.bertof.net" = ssl // { locations."/".proxyPass = "http://loki.local:8123/"; };
"home-assistant.bertof.net" = ssl // {
locations."/" = {
proxyPass = "http://loki.local:8123/";
proxyWebsockets = true;
};
extraConfig = ''
proxy_pass_header Authorization;
'';
};
};
};
openssh = { enable = true; openFirewall = true; };