404 instead of "no inout file specified"?

Roxis roxis at list.ru
Wed Jul 1 18:01:21 MSD 2009


On Wednesday 01 July 2009, Nuno Magalhães wrote:
> Greetings,
>
> If i provide a valid URL, it's processed.
> If i provide an invalid URL, nginx shows the 404 page except it the
> invalid URL ends in .php - in that case i get the "no input file
> specified" message.
>
> I'm in the process of changing my php files to an html extension (i
> assume that would "fix" things), however, i'd like to get a 404
> instead of the message regardless.
>
> I tried using "fastcgi_intercept_errors off" in the conf for my server
> (in sites-available), but it didn't do anything (i did restart both
> nginx and the fast-cgi processes).
>
> Is there a better way?
>
> TIA,
> Nuno Magalhães

fastcgi_intercept_errors is off by default
you need to set it on

fastcgi_intercept_errors on;





More information about the nginx mailing list