diff options
author | root <root@jones.dk> | 2015-01-27 16:17:28 +0100 |
---|---|---|
committer | root <root@jones.dk> | 2015-01-27 16:17:28 +0100 |
commit | ebaff5e74eaee861972b225117d55ba771aa5984 (patch) | |
tree | 02fdec148963785f400ec6fdb500963a2f39539a | |
parent | 88ffe56f0ca868f0a59d44c2175e2ad9a666a3ca (diff) |
Add cgit snippet.
-rw-r--r-- | apache2/conf.available/cgit.conf | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/apache2/conf.available/cgit.conf b/apache2/conf.available/cgit.conf new file mode 100644 index 0000000..5ccb726 --- /dev/null +++ b/apache2/conf.available/cgit.conf @@ -0,0 +1,31 @@ +AddDefaultCharset UTF-8 + +<Directory /srv/git> + Options None + AllowOverride None + Require all granted +</Directory> + +<Directory /usr/lib/cgit> + Options ExecCgi FollowSymLinks + AllowOverride None + Require all granted +</Directory> + + +<Directory /usr/share/cgit> + Options None + AllowOverride None + Require all granted +</Directory> + +RewriteEngine on + +RewriteRule ^/(cgit-css/)?(cgit\.(css|png)|favicon\.ico|robots.txt)$ /usr/share/cgit/$2 [last] + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule "^(.*)/(.*)/(HEAD|info/refs|objects/(info/[^/]+|[0-9a-f]{2}/[0-9a-f]{38}|pack/pack-[0-9a-f]{40}\.(pack|idx))|git-(upload|receive)-pack)$" /usr/lib/git-core/git-http-backend/$1.git/$2 [NS,L,QSA] + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(/.*)?$ /usr/lib/cgit/cgit.cgi$1 [T=application/x-httpd-cgi,L,NS] |