You should use: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; Or even better: [code]location = /3.cgi { fastcgi_pass fastcgiends; include fastcgi.conf; }[/code] Posted at Nginx Forum: http://forum.nginx.org/read.php?2,157079,157324#msg-157324