Nginx proxy: switch to tailscale
This commit is contained in:
parent
611eba5de8
commit
4f77fc3fb4
3 changed files with 16 additions and 4 deletions
|
|
@ -68,12 +68,12 @@
|
||||||
ssl = { enableACME = true; forceSSL = true; };
|
ssl = { enableACME = true; forceSSL = true; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"unimi.bertof.net" = ssl // {
|
"me.bertof.net" = ssl // {
|
||||||
locations."/".extraConfig =
|
locations."/".extraConfig =
|
||||||
"rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;";
|
"rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;";
|
||||||
};
|
};
|
||||||
"home-assistant.bertof.net" = ssl // {
|
"home-assistant.bertof.net" = ssl // {
|
||||||
locations."/" = { proxyPass = "http://loki.zto:8123/"; proxyWebsockets = true; };
|
locations."/" = { proxyPass = "http://loki.tsn:8123/"; proxyWebsockets = true; };
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_pass_header Authorization;
|
proxy_pass_header Authorization;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
|
|
|
||||||
|
|
@ -280,7 +280,12 @@ in
|
||||||
|
|
||||||
http = {
|
http = {
|
||||||
use_x_forwarded_for = true;
|
use_x_forwarded_for = true;
|
||||||
trusted_proxies = [ hosts.zerotier.ipv4."baldur.zto" "::1" "127.0.0.1" ];
|
trusted_proxies = [
|
||||||
|
hosts.zerotier.ipv4."baldur.zto"
|
||||||
|
hosts.tailscale.ipv4."baldur.tsn"
|
||||||
|
"::1"
|
||||||
|
"127.0.0.1"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
automation = "!include automations.yaml";
|
automation = "!include automations.yaml";
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,14 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
trustedProxies = [ hosts.zerotier.ipv4."baldur.zto" hosts.zerotier.ipv6."baldur.zto" "baldur.zto" ];
|
trustedProxies = [
|
||||||
|
hosts.zerotier.ipv4."baldur.zto"
|
||||||
|
hosts.zerotier.ipv6."baldur.zto"
|
||||||
|
hosts.tailscale.ipv4."baldur.tsn"
|
||||||
|
hosts.tailscale.ipv6."baldur.tsn"
|
||||||
|
"baldur.zto"
|
||||||
|
"baldur.tsn"
|
||||||
|
];
|
||||||
extraTrustedDomains = [ config.services.nextcloud.hostName "freya.zto" ];
|
extraTrustedDomains = [ config.services.nextcloud.hostName "freya.zto" ];
|
||||||
adminpassFile = config.age.secrets.nextcloud_admin_secret.path;
|
adminpassFile = config.age.secrets.nextcloud_admin_secret.path;
|
||||||
overwriteProtocol = "https";
|
overwriteProtocol = "https";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue