I wait for CGI support for 10 years without any lucky. So finally I made a cgi plugin for nginx by myself. https://github.com/pjincz/nginx-cgi
After installing of the plugin, just turn on cgi support by:
location /cgi-bin { cgi on; }