How to get nginx + uwsgi to exec, not display, perl cgi script?

Francis Daly francis at
Tue Aug 13 13:20:47 UTC 2019

On Mon, Aug 12, 2019 at 09:37:49AM -0700, koocr at wrote:

Hi there,

> I run Nginx as my webserver.  Usually with PHP, using fpm.
> Gitweb's gitweb.cgi looks like it needs perl CGI.
> For perl cgi I'm trying to get it working with UWSGI,


UWSGI and CGI are different things.

For what it's worth, when I search Google for "nginx gitweb", the first
few results all suggest to use "fastcgi". (Which is also different from
CGI; but there are some well-known fastcgi-wrapper services that handle
those differences.)

When I search for "nginx gitweb uwsgi" there are not a lot of
immediately-obviously-relevant results.

So if the aim is "run gitweb, behind nginx", then probably "use fastcgi"
is the path of least resistance.

If the aim is to use uwsgi, then you will probably want to investigate
how to make *this* cgi script accessible via the uwsgi protocol --
maybe there is a generic uwsgi/cgi wrapping tool; or maybe this cgi
script has a works-with-another-protocol mode.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list