From 92984cc85b38f22ac77507304ac216cc02269702 Mon Sep 17 00:00:00 2001 From: Ivan Dimitrov Date: Tue, 28 Nov 2023 16:45:47 +0200 Subject: [PATCH] add a virtual host for www as well --- mailserver/nginx/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/mailserver/nginx/default.nix b/mailserver/nginx/default.nix index 4c7d93e..4cd74ed 100644 --- a/mailserver/nginx/default.nix +++ b/mailserver/nginx/default.nix @@ -16,11 +16,20 @@ add_header 'Referrer-Policy' 'origin-when-cross-origin'; add_header X-Content-Type-Options nosniff; ''; - virtualHosts."idimitrov.dev" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:3000"; + virtualHosts = { + "idimitrov.dev" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:3000"; + }; + }; + "www.idimitrov.dev" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:3000"; + }; }; }; };