aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorAsk Bjørn Hansen <ask@develooper.com>2008-06-07 00:19:26 -0700
committerJunio C Hamano <gitster@pobox.com>2008-06-08 13:46:37 -0700
commit55f409a826cbd574333dbc91d6f7e1e9888d696d (patch)
tree2c8768baaeb0cfe62d0a81b6a093139bc6a331c0 /gitweb
parentc4a7ff52bda5c2e4cd08074ce4c27dbc0fc5242a (diff)
downloadgit-55f409a826cbd574333dbc91d6f7e1e9888d696d.tar.gz
git-55f409a826cbd574333dbc91d6f7e1e9888d696d.tar.xz
gitweb setup instruction: rewrite HEAD and root as well
Also add a few more hints for how to setup and configure gitweb as described [jc: with a fix from Mike Hommey] Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb')
-rw-r--r--gitweb/README18
1 files changed, 14 insertions, 4 deletions
diff --git a/gitweb/README b/gitweb/README
index 8f7ea367b..356ab7b32 100644
--- a/gitweb/README
+++ b/gitweb/README
@@ -255,12 +255,15 @@ Webserver configuration
If you want to have one URL for both gitweb and your http://
repositories, you can configure apache like this:
-<VirtualHost www:80>
- ServerName git.domain.org
+<VirtualHost *:80>
+ ServerName git.example.org
DocumentRoot /pub/git
- RewriteEngine on
- RewriteRule ^/(.*\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
SetEnv GITWEB_CONFIG /etc/gitweb.conf
+ RewriteEngine on
+ # make the front page an internal rewrite to the gitweb script
+ RewriteRule ^/$ /cgi-bin/gitweb.cgi
+ # make access for "dumb clients" work
+ RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
</VirtualHost>
The above configuration expects your public repositories to live under
@@ -276,6 +279,13 @@ override the defaults given at the head of the gitweb.perl (or
gitweb.cgi). Look at the comments in that file for information on
which variables and what they mean.
+If you use the rewrite rules from the example you'll likely also need
+something like the following in your gitweb.conf (or gitweb_config.perl) file:
+
+ @stylesheets = ("/some/absolute/path/gitweb.css");
+ $my_uri = "/";
+ $home_link = "/";
+
Originally written by:
Kay Sievers <kay.sievers@vrfy.org>