From 16d8f44e6f1212879d83b30de268399c0858c7ff Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 3 Feb 2015 14:35:47 +0100 Subject: Add Apache 2.2 style cgit snippet. --- apache2/conf.d/local-cgit.conf | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 apache2/conf.d/local-cgit.conf (limited to 'apache2/conf.d/local-cgit.conf') diff --git a/apache2/conf.d/local-cgit.conf b/apache2/conf.d/local-cgit.conf new file mode 100644 index 0000000..ee291e2 --- /dev/null +++ b/apache2/conf.d/local-cgit.conf @@ -0,0 +1,34 @@ +AddDefaultCharset UTF-8 + + + Options None + AllowOverride None + Order allow,deny + allow from all + + + + Options ExecCgi FollowSymLinks + AllowOverride None + Order allow,deny + allow from all +< + + + + Options None + AllowOverride None + Order allow,deny + allow from all +< + +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] -- cgit v1.2.3