diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 166e5a6b2ce..698d37133d7 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -138,7 +138,7 @@ let server_name ${serverName} ${concatStringsSep " " vhost.serverAliases}; ${acmeLocation} location / { - return 301 https://$host${optionalString (port != 443) ":${port}"}$request_uri; + return 301 https://$host${optionalString (port != 443) ":${toString port}"}$request_uri; } } ''}