From 5c8efb372182d82d02b33329c92901c5fb93b6f9 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Tue, 13 Jul 2021 08:30:44 -0400 Subject: migrate cgit to fcgi socket --- config/cgit.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/cgit.nix b/config/cgit.nix index a9f34b8..91d1c95 100644 --- a/config/cgit.nix +++ b/config/cgit.nix @@ -16,8 +16,7 @@ let repository-sort=age enable-html-serving=1 ''; -in -{ +in { imports = [ ./fcgiwrap.nix ]; networking.firewall.allowedTCPPorts = [ gitPort ]; @@ -27,7 +26,10 @@ in virtualHosts = { "git-internal" = { root = "${pkgs.cgit}/cgit"; - listen = [{ addr = "*"; port = gitPort; }]; + listen = [{ + addr = "*"; + port = gitPort; + }]; extraConfig = "try_files $uri @cgit;"; locations."/git/" = { extraConfig = '' @@ -42,7 +44,7 @@ in fastcgi_param PATH_INFO $uri; fastcgi_param QUERY_STRING $args; fastcgi_param HTTP_HOST $server_name; - fastcgi_pass 127.0.0.1:${toString fcgiPort}; + fastcgi_pass unix:${services.fcgiwrap.socketAddress}; ''; }; }; -- cgit v1.2.3