-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
1 changed file
with
14 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 <[email protected]> | ||
|