From a252925a7674b5f8247593a959d4522cd39731b8 Mon Sep 17 00:00:00 2001 From: Lgmrszd Date: Sun, 19 May 2024 02:18:21 +0300 Subject: [PATCH] vps1 server root domain from a directory --- hosts/vps1/configuration.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hosts/vps1/configuration.nix b/hosts/vps1/configuration.nix index 556c11a..8eede30 100644 --- a/hosts/vps1/configuration.nix +++ b/hosts/vps1/configuration.nix @@ -6,6 +6,12 @@ let akkoDomain = "akko429164.testdrive.${rootDomain}"; iceDomain = "ice758549.testdrive.${rootDomain}"; gitSSHPort = data.services.git.sshPort; + + robots_disallow_all = pkgs.writeText "robots.txt" '' + User-agent: * + Disallow: / + ''; + in { imports = [ @@ -93,7 +99,13 @@ in virtualHosts.${rootDomain} = { onlySSL = true; useACMEHost = "${rootDomain}"; - root = "/var/www/todo"; + root = "/var/www/root"; + locations."/robots.txt" = { + alias = robots_disallow_all; + extraConfig = '' + add_header Content-Type text/plain; + ''; + }; }; virtualHosts.${gtnhDomain} = { forceSSL = true;