From 4658d31f53be49254a8c15e74c7e47a0d19fd56c Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sun, 19 May 2024 11:30:57 +0100 Subject: [PATCH] caddy user serverAliases for main landing page --- services/caddy.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/services/caddy.nix b/services/caddy.nix index 5cd2c5bc..f4eecfde 100644 --- a/services/caddy.nix +++ b/services/caddy.nix @@ -3,15 +3,11 @@ services.caddy = { enable = true; email = "evie@xenia.me.uk"; - virtualHosts = { - "xenia.me.uk".extraConfig = '' + virtualHosts."xenia.me.uk" = { + serverAliases = ["www.xenia.me.uk"]; + extraConfig = '' redir https://www.xenia.me.uk ''; - "www.xenia.me.uk".extraConfig = '' - file_server * { - root /var/www/xenia.me.uk/ - } - ''; }; }; services.fail2ban = {