From fd4e6aeae35d421f3e89c460bef51bc9471e63f7 Mon Sep 17 00:00:00 2001 From: clerie Date: Wed, 22 Mar 2023 22:41:33 +0100 Subject: [PATCH] hosts/web-2: implement redirects for blog.clerie.de --- hosts/web-2/blog.nix | 19 +++++++++++++++++++ hosts/web-2/configuration.nix | 1 + 2 files changed, 20 insertions(+) create mode 100644 hosts/web-2/blog.nix diff --git a/hosts/web-2/blog.nix b/hosts/web-2/blog.nix new file mode 100644 index 0000000..331c80f --- /dev/null +++ b/hosts/web-2/blog.nix @@ -0,0 +1,19 @@ +{ ... }: + +{ + services.nginx.virtualHosts = { + "blog.clerie.de" = { + enableACME = true; + forceSSL = true; + locations."/" = { + return = ''301 https://clerie.de''; + }; + locations."/impressum" = { + return = ''301 https://legal.clerie.de/#impressum''; + }; + locations."/datenschutz" = { + return = ''301 https://legal.clerie.de/#datenschutz''; + }; + }; + }; +} diff --git a/hosts/web-2/configuration.nix b/hosts/web-2/configuration.nix index dc062c5..1420f2d 100644 --- a/hosts/web-2/configuration.nix +++ b/hosts/web-2/configuration.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix + ./blog.nix ./bubblesort.nix ./bula22.nix ./clerie.nix