And here’s the configuration for Apache, for those who use it:
1
2
3
4
5
6
7
8
9
10
<VirtualHost*:80>ServerName git.example.org
DocumentRoot/pub/gitSetEnv GITWEB_CONFIG /etc/gitweb.confRewriteEngineon# make the front page an internal rewrite to the gitweb scriptRewriteRule ^/$ /cgi-bin/gitweb.cgi# make access for "dumb clients" workRewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /cgi-bin/gitweb.cgi%{REQUEST_URI} [L,PT]
</VirtualHost>
Or, in the Debian Squeeze version, you can find this:
# path to git projects (<project>.git)$projectroot="/var/lib/git";
# directory to use for temp files$git_temp="/tmp";
# target of the home link on top of all pages#$home_link = $my_uri || "/";# html text to include at home page$home_text="indextext.html";
# file with project list; by default, simply scan the projectroot dir.$projects_list=$projectroot;
# stylesheet to use$stylesheet="/gitweb.css";
# logo to use$logo="/git-logo.avif";
# the 'favicon'$favicon="/git-favicon.png";
# change default git logo url$logo_url="http://www.deimos.fr/gitweb";
$logo_label="Deimos.fr Git Repository";
# This prevents gitweb to show hidden repositories$export_ok="git-daemon-export-ok";
$strict_export= 1;
# This lets it make the URLs you see in the header@git_base_url_list =('git://www.deimos.fr/git');
If you want to change the header of your gitweb, create an indextext.html file at the location of the cgi and insert HTML code:
1
2
3
4
5
6
7
8
9
10
11
12
<h2>Deimos Git</h2>
Welcome on my Gitweb. I store here my configurations that I usually use every
days.<br /><br />
Other links:<br />
- My blog: <ahref="http://www.deimos.fr/blog">http://www.deimos.fr/blog</a><br />
- My wiki:
<ahref="http://www.deimos.fr/mytechnotebook" >http://www.deimos.fr/mytechnotebook</a><br />
If you want integration with Piwik, it’s quite simple. I’ve made a patch - you’ll need to modify the JavaScript code to display in your page in this patch: