Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up an hgwebdir configuration for the first time with Mercurial on apache2. I can see the three repositories I've set up in the first page, and I've figured out how to modify their names so they don't resemble the directory path.

But when I click to go to one of the repositories, the URL becomes http://localhost/hg/hgweb.cgi/path/to/repos. I would like the directory to be http://localhost/hg/name instead as that is easier to remember for people who want to clone the repository.

Is there anyway to do that with hgwebdir?

share|improve this question
add comment

1 Answer

It really depends on the web server you are using.

In my case I'm using Apache and simply edited the httpd-vhosts.conf file and for the domain running hgweb.cgi set up the following Script Alias:

ScriptAlias /hg /FULL/PATH/TO/hgweb.cgi

Also I see you are referring to hgwebdir.cgi script. This has since been merged with the hgweb.cgi script since version 1.6. You can get the latest version of this file from the Mercurial source repository:

http://www.selenic.com/repo/hg/raw-file/stable/hgweb.cgi

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.