I have tried to host a Mercurial HG repository using a Scriptalias.
ScriptAlias /hg/ \"htdocs/hgwebdir.cgi\"
If I go to Chrome it display the contents of the cgi
Starting with version 1.6 of Mercurial, the hgwebdir.wsgi script has been unified with the hgweb.wsgi script. Wherever hgwebdir.wsgi is referred to in these directions, you can substitute the hgweb.wsgi script instead.
https://www.mercurial-scm.org/wiki/modwsgi