Use upstreams

This commit is contained in:
jaina heartles 2024-02-29 13:29:08 -08:00
parent 0ae54aeafb
commit 44a854c09d
1 changed files with 4 additions and 2 deletions

View File

@ -15,6 +15,9 @@
services.nginx = { services.nginx = {
enable = true; enable = true;
recommendedProxySettings = true; recommendedProxySettings = true;
upstreams."home-server".extraConfig = ''
include /etc/nixos-secrets/nginx-home-server-upstream.conf;
'';
virtualHosts = { virtualHosts = {
"*.home.heartles.xyz" = { "*.home.heartles.xyz" = {
listen = [ listen = [
@ -43,10 +46,9 @@
locations."/" = { locations."/" = {
proxyWebsockets = true; proxyWebsockets = true;
proxyPass = "$home_address"; proxyPass = "https://home-server";
extraConfig = '' extraConfig = ''
proxy_ssl_name $host; proxy_ssl_name $host;
include /etc/nixos-secrets/nginx-proxy-pass-home.conf;
''; '';
}; };
}; };