Comments on Serving CGI Scripts With Nginx On CentOS 6.0

Serving CGI Scripts With Nginx On CentOS 6.0 This tutorial shows how you can serve CGI scripts (Perl scripts) with nginx on CentOS 6.0. While nginx itself does not serve CGI, there are several ways to work around this. I will outline two solutions: the first is to proxy requests for CGI scripts to Thttpd, a small web server that has CGI support, while the second solution uses a CGI wrapper to serve CGI scripts.

3 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Mike

You have an error in your spawn config

fcgi.pid -- /usr/bin/php-cgi"

By: YichengCheng

This saved my day!

By: pluto

when add below two lines that should work on debian.

    allow all;

    fastcgi_pass   unix:/var/run/fcgiwrap.socket;

 

 

server {

    listen 889;

    location /cgi-bin/  {

    gzip off;

    root  /home/nginx/test;

    allow all;

    fastcgi_pass   unix:/var/run/fcgiwrap.socket;

    include /etc/nginx/fastcgi_params;

    fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;

   }

}