Use upstreams
This commit is contained in:
parent
0ae54aeafb
commit
44a854c09d
1 changed files with 4 additions and 2 deletions
|
@ -15,6 +15,9 @@
|
|||
services.nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
upstreams."home-server".extraConfig = ''
|
||||
include /etc/nixos-secrets/nginx-home-server-upstream.conf;
|
||||
'';
|
||||
virtualHosts = {
|
||||
"*.home.heartles.xyz" = {
|
||||
listen = [
|
||||
|
@ -43,10 +46,9 @@
|
|||
|
||||
locations."/" = {
|
||||
proxyWebsockets = true;
|
||||
proxyPass = "$home_address";
|
||||
proxyPass = "https://home-server";
|
||||
extraConfig = ''
|
||||
proxy_ssl_name $host;
|
||||
include /etc/nixos-secrets/nginx-proxy-pass-home.conf;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue