mercurial web server deployment on nginx

Manlio Perillo manlio_perillo at libero.it
Mon Aug 20 11:57:57 CDT 2007


Maxim Khitrov ha scritto:
> [...]
> 
> Missed my thread by a day :)
> 
> This is what you need:
> http://selenic.com/repo/hg/raw-file/tip/contrib/hgwebdir.fcgi
> 
> I'm using it in combination with lighttpd's spawn-fcgi binary and so
> far nginx seems to be pretty happy. To start the server you would do
> something like this:
> 
> spawn-fcgi -f <path to hgwebdir.fcgi> -u <user> -g <group> -s <unix
> socket> -P <pid> 2> /dev/null
> 

Thanks.
I have tried a few days ago but spawn-fcgi failed with a
sh: line 0: exec: hgwebdir.fcgi: not found

I called spawn-fcgi with
   -f hgwebdir.fcgi
where hgwebdir is in current directory...
All I have to do is
   -f ./hgwebdir.fcgi

> You will have to make sure that nginx passes PATH_INFO variable to the
> socket, otherwise you will not be able to access any repositories.
> There are a few problems with this approach. First of all, if you
> don't redirect stderr output you will keep getting boken pipe error. 

I have found this problem with a Django application, too.

>I
> don't know why that happens. Second is that if you try to access a
> non-existent repository you will see python's traceback if using
> gitweb template. In the regular CGI script you could comment out
> cgitb.enable() and that would hide the traceback. With FastCGI the
> only option seems to be to download the latest gitweb template from
> tip and replace the installed one.
>

Ok, thanks.


Manlio Perillo


More information about the Mercurial mailing list