summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
authorAlan Pearce2024-06-02 12:40:19 +0200
committerAlan Pearce2024-06-02 12:40:19 +0200
commitc4551822cada1f096d32ee73c95252b1145071e9 (patch)
tree5c0dc372e54682979fca341f40ced59694a11632 /system
parentbc9d4a694cf22e6be62dc0fd768adba60f054bb3 (diff)
downloadnixfiles-c4551822cada1f096d32ee73c95252b1145071e9.tar.lz
nixfiles-c4551822cada1f096d32ee73c95252b1145071e9.tar.zst
nixfiles-c4551822cada1f096d32ee73c95252b1145071e9.zip
linde: set up as backup web server
Diffstat (limited to 'system')
-rw-r--r--system/linde.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/linde.nix b/system/linde.nix
index 3c17f498..3f1d5777 100644
--- a/system/linde.nix
+++ b/system/linde.nix
@@ -685,6 +685,20 @@ in
         "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";