Well with further tests here are my conclusions:
With Apache hgweb and hgwebdir work flawlessly. I have 2 repositories
published and they all work perfectly.
Now with nginx I have tested different cgi/fastcgi setups and kept the
exact same nginx and mercurial configuration files, only the
redirection to the correct cgi/fastcgi server was changed in the
nginx.conf file (fatcgi_pass xxxxxxxxxxx)
1) Using this CGI setup: http://wiki.codemongers.com/NginxSimpleCGI
Browsing with hgweb OK
Browsing with hgwebdir was not tested
Pushing through http crashes the socket.
2) Using this fastcgi setup: http://nginx.eu/nginx-fcgi.html
Browsing with hgweb OK
Browsing with hgwebdir doesn't show any repository and there is no CSS
decoration
Pushing through http returns "does not appear to be an hg repository".
Pulling and cloning through http both work
3) Using the fasctgi setup that uses spawn-fcgi found on the mailing
list with a spawn on 127.0.0.1:10008. The link:
http://www.selenic.com/pipermail/mercurial/2007-August/014240.html
Browsing with hgweb shows just as much as browsing with hgwebdir: no repository
Browsing with hgwebdir shows no repository and no CSS decoration
Pushing through http returns: "operation not supported over http"
If I open a socket to connect to, I get in /var/log/nginx/error.log:
"111: connection refused"
Therefore it seems that it is the fastcgi setup that is going wrong.
It's a shame that the Python via Flup/FastCGI/WSGI doesn't exist yet
on the nginx documentation page.