From b936843bb0464d95d0afbfbf7b9656d80a7464a7 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 17 Feb 2022 18:34:00 +0300 Subject: feat(ops/modules): Redirect machine base names to their config With this change, entering just "whitby.tvl.fyi" or "sanduny.tvl.su" in a browser will redirect users to their machine configurations. Change-Id: Ibf076a469bcce073e1b1970aa568d6fe16a5c75a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5304 Tested-by: BuildkiteCI Reviewed-by: sterni Autosubmit: tazjin --- ops/modules/www/whitby.tvl.fyi.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 ops/modules/www/whitby.tvl.fyi.nix (limited to 'ops/modules/www/whitby.tvl.fyi.nix') diff --git a/ops/modules/www/whitby.tvl.fyi.nix b/ops/modules/www/whitby.tvl.fyi.nix new file mode 100644 index 000000000000..bcd7a76ec4e8 --- /dev/null +++ b/ops/modules/www/whitby.tvl.fyi.nix @@ -0,0 +1,17 @@ +# Redirect whitby.tvl.fyi to the machine configuration. + +{ + imports = [ + ./base.nix + ]; + + config.services.nginx.virtualHosts."whitby.tvl.fyi" = { + serverName = "whitby.tvl.fyi"; + serverAliases = [ "whitby.tvl.su" ]; + enableACME = true; + + extraConfig = '' + return 302 https://at.tvl.fyi/?q=%2F%2Fops%2Fmachines%2Fwhitby; + ''; + }; +} -- cgit 1.4.1