gitweb: document webserver configuration for common gitweb/repo URLs.
Add a small apache configuration which shows how to use apache to put gitweb and GIT repositories at the same URL. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Martin Waitz committed
Oct 3, 2006 at 10:03 UTC
128eead19821ba18e2912ebf30e5621d08735e79
1 file changed
+25
-1
gitweb/README
+25
-1
@@ -1,4 +1,5 @@
1
GIT web Interface
2
+=================
3
4
The one working on:
5
http://www.kernel.org/git/
@@ -6,7 +7,8 @@ The one working on:
7
From the git version 1.4.0 gitweb is bundled with git.
8
9
9
-How to configure gitweb for your local system:
10
+How to configure gitweb for your local system
11
+---------------------------------------------
12
13
You can specify the following configuration variables when building GIT:
14
* GITWEB_SITENAME
@@ -29,6 +31,28 @@ You can specify the following configuration variables when building GIT:
31
environment variable will be loaded instead of the file
32
specified when gitweb.cgi was created.
33
34
+
35
+Webserver configuration
36
+-----------------------
37
+
38
+If you want to have one URL for both gitweb and your http://
39
+repositories, 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]
46
+</VirtualHost>
47
+
48
+The above configuration expects your public repositories to live under
49
+/pub/git and will serve them as http://git.domain.org/dir-under-pub-git,
50
+both as cloneable GIT URL and as browseable gitweb interface.
51
+If you then start your git-daemon with --base-path=/pub/git --export-all
52
+then you can even use the git:// URL with exactly the same path.
53
+
54
+
55
+
56
Originally written by:
57
Kay Sievers <kay.sievers@vrfy.org>
58