diff --git a/modules/web/fsrewsp.nix b/modules/web/fsrewsp.nix index a64dcc1..57ad6bb 100644 --- a/modules/web/fsrewsp.nix +++ b/modules/web/fsrewsp.nix @@ -36,6 +36,9 @@ in services.nginx.enable = true; services.nginx = { + virtualHosts."www.${domain}" = { + locations."/".return = "301 $scheme://${domain}$request_uri"; + }; virtualHosts."${domain}" = { root = "/srv/web/fsrewsp"; extraConfig = '' diff --git a/modules/web/nightline.nix b/modules/web/nightline.nix index 3ff9165..9cff390 100644 --- a/modules/web/nightline.nix +++ b/modules/web/nightline.nix @@ -33,6 +33,9 @@ in }; services.nginx = { + virtualHosts."www.${domain}" = { + locations."/".return = "301 $scheme://${domain}$request_uri"; + }; virtualHosts."${domain}" = { root = "/srv/web/nightline"; extraConfig = ''