diff --git a/nixos/nginx.nix b/nixos/nginx.nix index 4a7b39c..92c44f2 100644 --- a/nixos/nginx.nix +++ b/nixos/nginx.nix @@ -48,6 +48,18 @@ }; }; + "www.philippeterson.com" = { + enableACME = true; + forceSSL = false; + addSSL = true; + + locations."/" = { + extraConfig = '' + return 301 https://philippeterson.com$request_uri; + ''; + }; + }; + "philippeterson.com" = { enableACME = true; # Enable Let's Encrypt certificate for HTTPS forceSSL = false; # Redirect HTTP to HTTPS?