diff options
| author | Arun Isaac | 2026-08-03 16:49:18 +0100 |
|---|---|---|
| committer | Arun Isaac | 2026-08-04 13:24:54 +0100 |
| commit | a97382c5028b054a7ffc76f1b59c7f103898d6d7 (patch) | |
| tree | 4a44bfdc418d04abdd4e791e1e357a37987a8cf3 /guix | |
| parent | dcb94ca753c0f5c73686d611fb7201d50bf47a13 (diff) | |
| download | guix-forge-a97382c5028b054a7ffc76f1b59c7f103898d6d7.tar.gz guix-forge-a97382c5028b054a7ffc76f1b59c7f103898d6d7.tar.lz guix-forge-a97382c5028b054a7ffc76f1b59c7f103898d6d7.zip | |
cgit: Move try_files to location context.
Diffstat (limited to 'guix')
| -rw-r--r-- | guix/forge/cgit.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/forge/cgit.scm b/guix/forge/cgit.scm index bfdcf9c..2f6598f 100644 --- a/guix/forge/cgit.scm +++ b/guix/forge/cgit.scm @@ -256,7 +256,6 @@ configured in @var{config}." (server-name (list server-name)) ;; cgit static files (root (file-append cgit "/share/cgit")) - (try-files (list "$uri" "@cgit")) (locations (list ;; git-http-backend for the smart HTTP protocol @@ -287,7 +286,13 @@ configured in @var{config}." "fastcgi_param HTTP_HOST $server_name;" (string-append "fastcgi_pass " (nginx-socket->string socket) - ";"))))))))) + ";")))) + ;; On other URIs, try a file before falling back to @cgit. This try_files + ;; cannot be in the server context because it would then apply to + ;; git-http-backend, etc. + (nginx-location-configuration + (uri "/") + (body (list "try_files $uri @cgit;")))))))) (define cgit-service-type (service-type |
