Here follows a fully working configuration for Git's gitweb.cgi on FQDN server:
UrlToolkit {
ToolkitID = git
Match ^/$ Rewrite /git
Match ^(/\?.*) Rewrite /git$1
}
VirtualHost {
Hostname = git.example.com
WebsiteRoot = /srv/vcs/git
AccessLogfile = /var/log/hiawatha/vhosts/git.example.com/access.log
ErrorLogfile = /var/log/hiawatha/vhosts/git.example.com/error.log
Alias = /static:/usr/share/gitweb/static
ScriptAlias = /git:/usr/share/gitweb/gitweb.cgi
EnablePathInfo = yes
ExecuteCGI = yes
FollowSymlinks = yes
Setenv GITWEB_CONFIG = /etc/gitweb.conf
TLScertFile = ssl/git.example.com.pem
TimeForCGI = 5
UseToolkit = git
}
and an example gitweb.conf:
## path to git projects (<project>.git)
$projectroot = "/srv/vcs/git";
## directory to use for temporary files
$git_temp = "/tmp";