diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-07-13 08:30:44 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2021-07-13 08:30:44 -0400 |
commit | 5c8efb372182d82d02b33329c92901c5fb93b6f9 (patch) | |
tree | c43c863d86679fad8bd0e53e40760c385aa7b454 /config | |
parent | 780910b5059fcc6c9815cdf0fe04705d8545fd12 (diff) |
migrate cgit to fcgi socket
Diffstat (limited to 'config')
-rw-r--r-- | config/cgit.nix | 10 |
1 files changed, 6 insertions, 4 deletions
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}; ''; }; }; |