all repos — nixfiles @ c4551822cada1f096d32ee73c95252b1145071e9

System and user configuration, managed by nix and home-manager

linde: set up as backup web server
Alan Pearce alan@alanpearce.eu
Sun, 02 Jun 2024 12:40:19 +0200
commit

c4551822cada1f096d32ee73c95252b1145071e9

parent

bc9d4a694cf22e6be62dc0fd768adba60f054bb3

1 files changed, 14 insertions(+), 0 deletions(-)

jump to
M system/linde.nixsystem/linde.nix
@@ -685,6 +685,20 @@ {         "http://" = {
           # Needed for HTTP->HTTPS servers
         };
+        "alanpearce.eu" = {
+          serverAliases = [ "www.alanpearce.eu" ];
+          useACMEHost = "alanpearce.eu";
+          extraConfig = ''
+            encode zstd gzip
+            root * /srv/http/website/public
+            file_server
+            ${security-headers {}}
+            handle_errors {
+              root * /srv/http/website/private
+              rewrite * 404.html
+            }
+          '';
+        };
         "${hostname}.alanpearce.eu" = {
           serverAliases = [ "https://" ];
           useACMEHost = "alanpearce.eu";