Forum

Fully Working Configuration hgweb.{cgi,fcg,wsgi}

Balwinder S Dheeman
21 August 2016, 03:00
Here follows a fully working configuration for mercurial's heweb.cgi based FQDN server:

UrlToolkit {
ToolkitID = hg
Match ^/hg(/static/*) Rewrite $1
Match ^/$ Rewrite /hg
}

VirtualHost {
Hostname = hg.example.com
WebsiteRoot = /srv/vcs/hg
AccessLogfile = /var/log/hiawatha/vhosts/hg.example.com/access.log
ErrorLogfile = /var/log/hiawatha/vhosts/hg.example.com/error.log
Alias = /static:/usr/lib/python2.7/site-packages/mercurial/templates/static
ScriptAlias = /hg:/usr/lib/python2.7/site-packages/mercurial/templates/static/hgweb.cgi
EnablePathInfo = yes
ExecuteCGI = yes
FollowSymlinks = yes
Setenv HGWEB_CONFIG = /etc/hgweb.conf
TLScertFile = ssl/hg.example.com.pem
TimeForCGI = 5
UseToolkit = hg
}


and an example hgweb.conf:

[defaults]
diff = -g

## Deprecated, huh; use paths
## Path to collection of repositories
[collections]
/srv/vcs/hg = /srv/vcs/hg

## Paths to individual repositories
#[paths]
#hgbook-hg = /srv/vcs/hg/hgbook-hg
#learn-hg = /srv/vcs/hg/learn-hg
#minimal-hg = /srv/vcs/hg/minimal-hg
#vx32-hg = /srv/vcs/hg/vx32-hg

## System level/default owner of repositories, you may override
## the 'ui.username' using respective .hg/hgrc in the repository
[ui]
username = Whoever Is Repo Owner <whoever.i.o@example.com>

[web]
#style = gitweb
allow_archive = bz2
Hugo Leisink
21 August 2016, 11:58
Thanks!
This topic has been closed.