Forum

Hiawatha configuraion snippets for hgweb.{cgi,fcg,wsgi}

Balwinder S Dheeman
13 August 2016, 15:19
I find someone gave up using Hiawatha webserver, just because she/he could not make the Mercurial's hgweb.cgi work with it. Here is what I figured out to make the same work without any wrapper and, or other utility. Hope, this helps you too ;-)
##
## HERE'RE SOME EXAMPLE SNIPPETS, YOU MAY ADD TO YOUR VIRTUALHOST RECORDS
## OR CONF AS APPROPRIATE, YOU SHOULD KNOW WELL WHAT INDEED YOU'RE DOING;
##
## ** DON'T USE THIS AS A FULLY WORKING/INCLUDABLE HIAWATHA CONF FILE! **

## Add these snippets as appropriate to your virtualhost(s)
#Directory {
# DirectoryId = hg
# ExecuteCGI = yes
# Path = /usr/lib/python2.7/site-packages/mercurial/templates/static
#}

#UrlToolkit {
# ToolkitID = redirect
## Add the following redirect rule(s) to your virtualhost(s)
# Match ^/hg/$ Rewrite /hg/hgweb.cgi
# Match ^/hg/hgweb.cgi/static/(.*) Rewrite /hg/$1
#}

#VirtualHost {
# Hostname = *.example.com
# ...
## Add the following lines to your virtualhost(s)
# Alias = /hg:/usr/lib/python2.7/site-packages/mercurial/templates/static
# EnablePathInfo = yes
# Setenv HGWEB_CONFIG = /etc/hgweb.conf
# UseDirectory = hg # Add the 'hg' into this list
# UseToolkit = redirect # Add the 'redirect/rewrite' toolkit into this list
#}
This topic has been closed.