From b089abdda26f0bd4c14c8bfa82b02a3e1e94e0b7 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Tue, 12 Apr 2016 11:43:32 -0400 Subject: cgit: fix virtual-root and document_root problems Again, these were fixed previously but I wiped them with an accidental git checkout. --- roles/git/templates/etc_cgitrc.j2 | 2 ++ roles/git/templates/etc_nginx_sites-available_cgit.j2 | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/git/templates/etc_cgitrc.j2 b/roles/git/templates/etc_cgitrc.j2 index a16642c..82af626 100644 --- a/roles/git/templates/etc_cgitrc.j2 +++ b/roles/git/templates/etc_cgitrc.j2 @@ -1,6 +1,8 @@ # Enable caching of up to 1000 output entries cache-size=1000 +# Fixes relative vs. absolute paths +virtual-root=/ # Specify some default clone urls using macro expansion clone-url=git@{{ cgit_hostname }}:$CGIT_REPO_URL https://{{ cgit_hostname }}/$CGIT_REPO_URL git://{{ cgit_hostname }}/$CGIT_REPO_URL diff --git a/roles/git/templates/etc_nginx_sites-available_cgit.j2 b/roles/git/templates/etc_nginx_sites-available_cgit.j2 index 2ad43e3..6678e47 100644 --- a/roles/git/templates/etc_nginx_sites-available_cgit.j2 +++ b/roles/git/templates/etc_nginx_sites-available_cgit.j2 @@ -9,7 +9,7 @@ server { location @cgit { index cgit.cgi; - fastcgi_param SCRIPT_FILENAME $document_root/cgit.cgi; + fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_param HTTP_HOST $server_name; fastcgi_param PATH_INFO $uri; -- cgit v1.2.3