hgweb.cgi question

Adis Nezirovic adis at linux.org.ba
Wed Nov 14 18:32:03 UTC 2007


On Wed, Nov 14, 2007 at 11:03:47AM -0500, David Frascone wrote:
>    I've set up hgweb.cgi, and I love it.  It is rock solid and fast.  But, I
>    don't like the url.  I'm using a ScriptAlias, so my urls all look like:
> 
>    (hg is Script Aliased to /some/path/cgi-hg/)
> 
>    http://server/hg/index.cgi/repo/
> 
>    I'd like to just be able to do:
> 
>    hg clone http://server/hg/repo/
> 
>    Is there a way to do that?  Sorry -- I'm a bit of an apache noob.

Use hgwebdir.cgi and ScriptAliasMatch Apache directive.
e.g.

apache config:
ServerName example.net
DocumentRoot /srv/www/vhosts/example.net/htdocs
ScriptAliasMatch ^/hg(.*) /srv/www/vhosts/example.net/cgi-bin/hgwebdir.cgi$1

hgweb.config (specified in hgwebdir.cgi):
[collections]
/srv/www/vhosts/example.net/htdocs/hg = /srv/www/vhosts/example.net/htdocs/hg

And you should be able to do:
hg clone http://example.net/hg/repo

Consult wiki for more info:
http://www.selenic.com/mercurial/wiki/index.cgi/PublishingRepositories
(just ignore mod_rewrite suggestions, it's overkill for this purpose)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20071114/0f7bea6b/attachment-0001.asc>


More information about the Mercurial mailing list