11 messages in ru.sysoev.nginxRe: FastCGI returning "No Input File"...
FromSent OnAttachments
APseudoUtopiaMay 21, 2009 9:24 am 
Michael ShadleMay 21, 2009 9:32 am 
Edho P AriefMay 21, 2009 9:41 am 
Igor SysoevMay 21, 2009 10:44 am 
Igor SysoevMay 21, 2009 10:46 am 
Igor SysoevMay 21, 2009 10:51 am 
Edho P AriefMay 21, 2009 6:23 pm 
APseudoUtopiaMay 21, 2009 10:48 pm 
Igor SysoevMay 22, 2009 12:20 am 
Edho P AriefMay 22, 2009 2:30 am 
Igor SysoevMay 22, 2009 3:08 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: FastCGI returning "No Input File" instead of 404Actions...
From:Edho P Arief (edho@gmail.com)
Date:May 21, 2009 6:23:13 pm
List:ru.sysoev.nginx

2009/5/22 Igor Sysoev <is@rambler-co.ru>:

On Thu, May 21, 2009 at 12:25:09PM -0400, APseudoUtopia wrote:

Hey everyone,

This seems like it would be easily solved, but I'm not sure how. I just finished setting up PHP on my system. It runs fine. However, when I browse to a page like "http://domain.com/this-php-script-does-not-exist.php" it returns "No input file specified" instead of a normal nginx 404 error. I'm trying to get it to display a normal 404 error instead. I've tried toggling the fastcgi_intercept_errors, which seems like it would fix the problem, however it didn't work.

I'm running nginx stable, 0.6.37.

It seems that try_files would work somehow, but my understanding is that try_files does not exist in 0.6.37?

try_files exists in 0.6.36+. You may try this also:

 location ~ .*\.php$ {        try_files  $uri  /404.html;

       fastcgi_pass 127.0.0.1:9000;        ...

thanks. is there a way to return default 404?

Or is this the correct way?

location ~ \.php${ try_files $uri @404; ... } ... location @404 { return 404; break; }