Lars Hjemli | 25105d7 | 2006-12-10 22:31:36 +0100 | [diff] [blame] | 1 | |
Lars Hjemli | dcef257 | 2006-12-13 02:06:29 +0100 | [diff] [blame] | 2 | cgit - cgi for git |
Lars Hjemli | 25105d7 | 2006-12-10 22:31:36 +0100 | [diff] [blame] | 3 | |
| 4 | |
Lars Hjemli | 66414b6 | 2007-01-28 13:18:23 +0100 | [diff] [blame] | 5 | This is an attempt to create a fast web interface for the git scm, using a |
| 6 | builtin cache to decrease server io-pressure. |
Lars Hjemli | 25105d7 | 2006-12-10 22:31:36 +0100 | [diff] [blame] | 7 | |
Lars Hjemli | 25105d7 | 2006-12-10 22:31:36 +0100 | [diff] [blame] | 8 | |
Lars Hjemli | 66414b6 | 2007-01-28 13:18:23 +0100 | [diff] [blame] | 9 | Installation |
| 10 | |
Lars Hjemli | c52e841 | 2007-02-04 23:57:34 +0100 | [diff] [blame^] | 11 | $ make gitsrc=<path> |
| 12 | $ su |
| 13 | $ make prefix=<path> install |
Lars Hjemli | 66414b6 | 2007-01-28 13:18:23 +0100 | [diff] [blame] | 14 | |
Lars Hjemli | c52e841 | 2007-02-04 23:57:34 +0100 | [diff] [blame^] | 15 | |
| 16 | Default value for gitsrc is "../git", and this directory should contain the |
| 17 | git sources. |
| 18 | |
| 19 | Default value for prefix is "/var/www/htdocs/cgit". This directory will |
| 20 | contain "cgit.cgi" and "cgit.css" after 'make install'. |
| 21 | |
| 22 | After installation, httpd.conf probably must be updated with a Directory- |
| 23 | section 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 Hjemli | 66414b6 | 2007-01-28 13:18:23 +0100 | [diff] [blame] | 31 | |
| 32 | |
| 33 | Runtime configuration |
| 34 | |
Lars Hjemli | c52e841 | 2007-02-04 23:57:34 +0100 | [diff] [blame^] | 35 | The file /etc/cgitrc is read by cgit before handling a request. In addition |
| 36 | to runtime parameters, this file also contains a list of the repositories |
| 37 | displayed by cgit. |
| 38 | |
| 39 | A template cgitrc is shipped with the sources, and all parameters and default |
| 40 | values are documented in this file. |
Lars Hjemli | 66414b6 | 2007-01-28 13:18:23 +0100 | [diff] [blame] | 41 | |
| 42 | |
| 43 | The cache |
| 44 | |
| 45 | When cgit is invoked it looks for a cachefile matching the request and |
| 46 | returns it to the client. If no such cachefile exist (or if it has expired), |
| 47 | the content for the request is written into the proper cachefile before the |
| 48 | file is returned. |
| 49 | |
| 50 | If the cachefile has expired but cgit is unable to obtain a lock for it, the |
| 51 | stale cachefile is returned to the client. This is done to favour page |
Lars Hjemli | dcef257 | 2006-12-13 02:06:29 +0100 | [diff] [blame] | 52 | throughput over page freshness. |
Lars Hjemli | 25105d7 | 2006-12-10 22:31:36 +0100 | [diff] [blame] | 53 | |
Lars Hjemli | 66414b6 | 2007-01-28 13:18:23 +0100 | [diff] [blame] | 54 | The generated content contains the complete response to the client, including |
| 55 | the http-headers "Modified" and "Expires". |