From f98db66b64ba80f998da78474ddf39a625048552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sat, 23 Sep 2023 23:11:44 +0300 Subject: [PATCH] grafana.jakstys.lt: use http --- hosts/vno1-oh2/configuration.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hosts/vno1-oh2/configuration.nix b/hosts/vno1-oh2/configuration.nix index e9ce9a7..4695de7 100644 --- a/hosts/vno1-oh2/configuration.nix +++ b/hosts/vno1-oh2/configuration.nix @@ -246,11 +246,17 @@ metrics } ''; - virtualHosts."grafana.jakstys.lt".extraConfig = '' + virtualHosts."grafana.jakstys.lt:443".extraConfig = '' + @denied not remote_ip ${myData.subnets.tailscale.cidr} + abort @denied + + redir http://grafana.jakstys.lt{uri} + tls {$CREDENTIALS_DIRECTORY}/grafana.jakstys.lt-cert.pem {$CREDENTIALS_DIRECTORY}/grafana.jakstys.lt-key.pem + ''; + virtualHosts."grafana.jakstys.lt:80".extraConfig = '' @denied not remote_ip ${myData.subnets.tailscale.cidr} abort @denied reverse_proxy 127.0.0.1:3000 - tls {$CREDENTIALS_DIRECTORY}/grafana.jakstys.lt-cert.pem {$CREDENTIALS_DIRECTORY}/grafana.jakstys.lt-key.pem ''; virtualHosts."bitwarden.jakstys.lt".extraConfig = '' @denied not remote_ip ${myData.subnets.tailscale.cidr}