blob: a14418e8db8af0e239b524a0f37505e94f9993ba [file] [log] [blame]
Lars Hjemli25105d72006-12-10 22:31:36 +01001
Lars Hjemlidcef2572006-12-13 02:06:29 +01002 cgit - cgi for git
Lars Hjemli25105d72006-12-10 22:31:36 +01003
4
Lars Hjemli66414b62007-01-28 13:18:23 +01005This is an attempt to create a fast web interface for the git scm, using a
6builtin cache to decrease server io-pressure.
Lars Hjemli25105d72006-12-10 22:31:36 +01007
Lars Hjemli25105d72006-12-10 22:31:36 +01008
Lars Hjemli66414b62007-01-28 13:18:23 +01009Installation
10
Lars Hjemlic52e8412007-02-04 23:57:34 +010011 $ make gitsrc=<path>
12 $ su
13 $ make prefix=<path> install
Lars Hjemli66414b62007-01-28 13:18:23 +010014
Lars Hjemlic52e8412007-02-04 23:57:34 +010015
16Default value for gitsrc is "../git", and this directory should contain the
17git sources.
18
19Default value for prefix is "/var/www/htdocs/cgit". This directory will
20contain "cgit.cgi" and "cgit.css" after 'make install'.
21
22After installation, httpd.conf probably must be updated with a Directory-
23section for cgit, possibly something like this:
24
25 <Directory "/var/www/htdocs/cgit/">
26 AllowOverride None
27 Options ExecCGI
28 Order allow,deny
29 Allow from all
30 </Directory>
Lars Hjemli66414b62007-01-28 13:18:23 +010031
32
33Runtime configuration
34
Lars Hjemlic52e8412007-02-04 23:57:34 +010035The file /etc/cgitrc is read by cgit before handling a request. In addition
36to runtime parameters, this file also contains a list of the repositories
37displayed by cgit.
38
39A template cgitrc is shipped with the sources, and all parameters and default
40values are documented in this file.
Lars Hjemli66414b62007-01-28 13:18:23 +010041
42
43The cache
44
45When cgit is invoked it looks for a cachefile matching the request and
46returns it to the client. If no such cachefile exist (or if it has expired),
47the content for the request is written into the proper cachefile before the
48file is returned.
49
50If the cachefile has expired but cgit is unable to obtain a lock for it, the
51stale cachefile is returned to the client. This is done to favour page
Lars Hjemlidcef2572006-12-13 02:06:29 +010052throughput over page freshness.
Lars Hjemli25105d72006-12-10 22:31:36 +010053
Lars Hjemli66414b62007-01-28 13:18:23 +010054The generated content contains the complete response to the client, including
55the http-headers "Modified" and "Expires".