No input file specified. on 404

Hi guys,

I have got a problem when tring to use nginx+fastcgi.

When i try to access a non-exist .php script, it returns "No input file specified." instead of 404.

Any ideas ?

PS: I followed the guide on

http://library.linode.com/web-servers/n … 0.04-lucid">http://library.linode.com/web-servers/nginx/php-fastcgi/ubuntu-10.04-lucid

PPS: missing static objects are returning normal 404

3 Replies

No input file specified is an error from PHP, you should get nginx to check if the file exists before passing it to PHP.

turns out a simple set of commands can catch this 404 error

fastcgiintercepterrors on;

error_page 404 /404.html;

Or at the top of the .php location put a

try_files $uri /404.html;

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct