@matheusbsbs / matheus-bagliano / commits / 55f409a826
Fork 0

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>

Ask Bjørn Hansen committed Jun 7, 2008 at 00:19 UTC 55f409a826cbd574333dbc91d6f7e1e9888d696d
1 file changed +14 -4
gitweb/README
+14 -4
@@ -255,12 +255,15 @@ Webserver configuration
255 If you want to have one URL for both gitweb and your http://
256 repositories, you can configure apache like this:
257
258 -<VirtualHost www:80>
259 - ServerName git.domain.org
258 +<VirtualHost *:80>
259 + ServerName git.example.org
260 DocumentRoot /pub/git
261 - RewriteEngine on
262 - RewriteRule ^/(.*\.git/(?!/?(info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
261 SetEnv GITWEB_CONFIG /etc/gitweb.conf
262 + RewriteEngine on
263 + # make the front page an internal rewrite to the gitweb script
264 + RewriteRule ^/$ /cgi-bin/gitweb.cgi
265 + # make access for "dumb clients" work
266 + RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
267 </VirtualHost>
268
269 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
279 gitweb.cgi). Look at the comments in that file for information on
280 which variables and what they mean.
281
282 +If you use the rewrite rules from the example you'll likely also need
283 +something like the following in your gitweb.conf (or gitweb_config.perl) file:
284 +
285 + @stylesheets = ("/some/absolute/path/gitweb.css");
286 + $my_uri = "/";
287 + $home_link = "/";
288 +
289
290 Originally written by:
291 Kay Sievers <kay.sievers@vrfy.org>