<VirtualHost*:80>ServerNamegit.example.org
DocumentRoot/pub/gitSetEnvGITWEB_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');
Restrict access
It's possible to disable access to certain repositories. To do this, enable this in your gitweb configuration:
<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/>
Web interface
Your server is now accessible via the following web interface: http://server/gitweb
More attractive theme
There is a more attractive theme than the default gitweb theme. Download the archive here and run these commands:
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: