add nginx to new home assistant

This commit is contained in:
2023-08-02 12:12:24 +02:00
parent 39eff80ba9
commit 3f7c2cc163

View File

@@ -26,5 +26,23 @@
]; ];
}; };
}; };
services.nginx.virtualHosts."home-assistant.cloonar.com" = {
forceSSL = true;
enableACME = true;
acmeRoot = null;
extraConfig = ''
proxy_buffering off;
'';
locations."/".extraConfig = ''
proxy_pass http://127.0.0.1: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;
'';
};
} }