From 8165d2215973565f6e5aa13771b8aeaebb68053c Mon Sep 17 00:00:00 2001 From: June Date: Mon, 21 Oct 2024 21:30:36 +0200 Subject: [PATCH] public-web-static: prevent staging ht ccchh from search machine indexing --- .../virtualHosts/staging.hackertours.hamburg.ccc.de.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/hosts/public-web-static/virtualHosts/staging.hackertours.hamburg.ccc.de.nix b/config/hosts/public-web-static/virtualHosts/staging.hackertours.hamburg.ccc.de.nix index 11b9e9b..4b71d53 100644 --- a/config/hosts/public-web-static/virtualHosts/staging.hackertours.hamburg.ccc.de.nix +++ b/config/hosts/public-web-static/virtualHosts/staging.hackertours.hamburg.ccc.de.nix @@ -33,6 +33,12 @@ in { root = "${dataDir}"; + # Disallow *, since this is staging and doesn't need to be in any search + # results. + locations."/robots.txt" = { + return = "200 \"User-agent: *\\nDisallow: *\\n\""; + }; + extraConfig = '' # Make use of the ngx_http_realip_module to set the $remote_addr and # $remote_port to the client address and client port, when using proxy