Birch Street Computing -

about me

John M is a Linux fan in Lowell, MA.

I work at at a local company writing software. I fool around with Free and Open Source software for fun.

I am an avid user.

Mercurial CGI with thttpd


I recently changed my web server from apache to thttpd for reasons that mostly centered on the simplicity of set up. As it turns out the cgi script that I use for mercurial, hgwebdir, expects an environment variable that apache sets but thttpd does not.

Since I was in the middle of other things and didn't want to spend much time fussing with mercurial itself I wrote a quick wrapper script that emulates the environment that mercurial expects. I decided to share it with the world, because I know that there are situations where you might be stuck running this version. (Like, if that's what your distro packages :-)

Download the hgwebdir wrapper script

Just download the file to where your hgwebdir cgi lives, change the original script's name to hgwebdir.realcgi and the wrapper's name to hgwebdir.cgi. Then make sure both are executable by the web server, that's all there is to it. Problem fixed :-)

Every blog page or article on this site is available under the CC-BY-SA license unless otherwise noted.