aboutsummaryrefslogtreecommitdiffstats
path: root/roles/git/templates
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-04-12 11:43:32 -0400
committerbnewbold <bnewbold@robocracy.org>2016-04-12 11:43:41 -0400
commitb089abdda26f0bd4c14c8bfa82b02a3e1e94e0b7 (patch)
treed2b5fb8997d44f6fc4b76661167adaf9038a6442 /roles/git/templates
parentadadc6ae3723c0a8a2619a74786cc68ed755363e (diff)
downloadinfra-b089abdda26f0bd4c14c8bfa82b02a3e1e94e0b7.tar.gz
infra-b089abdda26f0bd4c14c8bfa82b02a3e1e94e0b7.zip
cgit: fix virtual-root and document_root problems
Again, these were fixed previously but I wiped them with an accidental git checkout.
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;