Menu

Server and network management company

nginx: Using fcgiwrap for CGI applications deployment

From the box nginx doesn’t support CGI applications deployment since CGI is very old and poor performance way to run them. But some applications still should be deployed with use of CGI (earlier, we covered setup of Nagios and OTRS with nginx). Here is another way to do that. In this case we will use fcgiwrap tool by Grzegorz Nosek. It’s written in C and should provide better performance in comparison with pure Perl wrapper we use before.

Firstly we need install it. If you use Debian or Ubuntu just install if with apt-get:

aptitude install fcgiwrap

For Fedora we’ll need compile it from sources. Download fcgiwrap from Github and unpack. Install fcgi-devel:

yum install fcgi-devel

Then run:

make install

Now you should have fcgiwrap installed in /usr/local/bin/. So, we can proceed with nginx. Here is a sample configuration. As you can see all .cgi files will be considered as CGI applications.