From 4d4219c7a511979d6bb95c3f65c4010fbc5435be Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 23 Jun 2022 17:35:54 -0700 Subject: fix(modules/cgit): make cgit the default server for nginx If a request goes through nginx without a Host header set, the default site we serve is cgit. Without this option, nginx will pick the first site defined in the configuration, which is not what I want. I want to be specific about what is the default. Change-Id: If131b80c1488510e79d60ef6de5bb9db4fa18d58 Reviewed-on: https://cl.fcuny.net/c/world/+/482 Tested-by: CI Reviewed-by: Franck Cuny --- modules/services/cgit/default.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/services') diff --git a/modules/services/cgit/default.nix b/modules/services/cgit/default.nix index 3d83a70..b4e82ab 100644 --- a/modules/services/cgit/default.nix +++ b/modules/services/cgit/default.nix @@ -96,6 +96,10 @@ in }; services.nginx.virtualHosts."git.fcuny.net" = { + # make cgit the default site: if a request goes through nginx + # without a host header, this will be the default site we serve + # for that request. + default = true; forceSSL = true; enableACME = true; locations = { -- cgit 1.4.1