Update the gitweb/README file to include setting the GITWEB_CONFIG environment
[git/git.git] / gitweb / README
CommitLineData
0a8f4f00 1GIT web Interface
128eead1 2=================
0a8f4f00
JH
3
4The one working on:
5 http://www.kernel.org/git/
6
175fb6c0 7From the git version 1.4.0 gitweb is bundled with git.
0a8f4f00 8
5d043a3d 9
128eead1
MW
10How to configure gitweb for your local system
11---------------------------------------------
5d043a3d
MW
12
13You can specify the following configuration variables when building GIT:
14 * GITWEB_SITENAME
15 Shown in the title of all generated pages, defaults to the servers name.
16 * GITWEB_PROJECTROOT
17 The root directory for all projects shown by gitweb.
18 * GITWEB_LIST
19 points to a directory to scan for projects (defaults to project root)
20 or to a file for explicit listing of projects.
21 * GITWEB_HOMETEXT
22 points to an .html file which is included on the gitweb project
23 overview page.
24 * GITWEB_CSS
25 Points to the location where you put gitweb.css on your web server.
281f2f6b
MW
26 * GITWEB_LOGO
27 Points to the location where you put git-logo.png on your web server.
bb55f77f
ML
28 * GITWEB_CONFIG
29 This file will be loaded using 'require'. If the environment
30 $GITWEB_CONFIG is set when gitweb.cgi is executed the file in the
31 environment variable will be loaded instead of the file
32 specified when gitweb.cgi was created.
5d043a3d 33
128eead1
MW
34
35Webserver configuration
36-----------------------
37
38If you want to have one URL for both gitweb and your http://
39repositories, you can configure apache like this:
40
41<VirtualHost www:80>
42 ServerName git.domain.org
43 DocumentRoot /pub/git
44 RewriteEngine on
45 RewriteRule ^/(.*\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
604cb211 46 SetEnv GITWEB_CONFIG /etc/gitweb.conf
128eead1
MW
47</VirtualHost>
48
49The above configuration expects your public repositories to live under
50/pub/git and will serve them as http://git.domain.org/dir-under-pub-git,
51both as cloneable GIT URL and as browseable gitweb interface.
52If you then start your git-daemon with --base-path=/pub/git --export-all
53then you can even use the git:// URL with exactly the same path.
54
604cb211
AC
55Setting the environment variable GITWEB_CONFIG will tell gitweb to use
56the named file (i.e. in this example /etc/gitweb.conf) as a
57configuration for gitweb. Perl variables defined in here will
58override the defaults given at the head of the gitweb.perl (or
59gitweb.cgi). Look at the comments in that file for information on
60which variables and what they mean.
128eead1
MW
61
62
ee0d3234 63Originally written by:
0a8f4f00 64 Kay Sievers <kay.sievers@vrfy.org>
ee0d3234
JH
65
66Any comment/question/concern to:
67 Git mailing list <git@vger.kernel.org>
68