aboutsummaryrefslogtreecommitdiffstats
path: root/roles/git/templates
diff options
context:
space:
mode:
Diffstat (limited to 'roles/git/templates')
-rw-r--r--roles/git/templates/etc_cgitrc.j22
-rw-r--r--roles/git/templates/etc_nginx_sites-available_cgit.j22
2 files changed, 3 insertions, 1 deletions
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;