From 3538d28e87e426e667a58a92f15e7dc4e3c30870 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Mon, 6 Mar 2023 22:20:26 +0100 Subject: [PATCH] weewx: Remove from CF --- container/webserver/default.nix | 26 +++++++++++++++++++++++++ secret/container/webserver/default.nix | Bin 346 -> 384 bytes 2 files changed, 26 insertions(+) diff --git a/container/webserver/default.nix b/container/webserver/default.nix index 64ce882..45e470a 100644 --- a/container/webserver/default.nix +++ b/container/webserver/default.nix @@ -41,4 +41,30 @@ in }; }; }; + + services.nginx.virtualHosts."${secret.container.webserver.hostname}" = { + http3 = true; + + root = "/etc/container-webserver/weewx/html/wdc"; + index = "index.html"; + forceSSL = true; + useACMEHost = "kempkens.io"; + + location."~* \.html$".extraConfig = '' + expires modified 120s; + ''; + + location."~* \.(js|css)$".extraConfig = '' + expires 1h; + ''; + + locations."~ ^/dwd/(icons|warn_icons)/" = { + recommendedProxySettings = true; + proxyPass = "http://127.0.0.1:8000"; + }; + + location."~ ^/dwd/[\w]+\.(gif|png)".extraConfig = '' + expires modified 1h; + ''; + }; } // custom-config diff --git a/secret/container/webserver/default.nix b/secret/container/webserver/default.nix index b85368b00d47086df71f046f87dc876fff9af543..640e8e3ceac6dde043bf60962461a721b56a18c0 100644 GIT binary patch literal 384 zcmV-`0e}7gM@dveQdv+`01Apw^U2S_;l;PKp;9j4C1+bE%UTate>(31A0iglwQy&B zUG?rVbu~cQ0ZH3iYL93=nH9T@a{@LM?!$#|b=NG@qn-(kOUkdi8+^+*!P7+t z{?uQ$3_#y*SF--$!IZ{^#lM`Kg3s;N#FW2n^KYqg$psMOk1-aAzMq4MLY|t8lKofH zz<2^F?s=N-2=_L5s=^3emgvy)f)p~-{N1B-9%6$dxAAp5jC3CpC*}fg$cf!#D6r6NX`0r>sxw)or0S$7=wv%lT| literal 346 zcmV-g0j2%`M@dveQdv+`07Y2!Q8DW&Wm)N3(V{TQcLQkl`~Z|q2Lg-nxY&Bt#9A7H zb-2e|6l1j}e8O9q3B5aoV@-=9GBksz&bOop-VFB6GiRs&#!y`e+vBM@LR z7im|8W3V`a36lfHYNuR{TK>q@4DHQ^AqSx;4R#G^hqG{no^d9dJ!srkwd>0DYNd$f zku{gN?U>;U6s)gy58=bYbbo$ju>(DQq#gsPx3B7d?AtAJoqa@DW?*OrWVP=EZ8|(z5y8r+H