Not existant files passed to php backend
Roxis
roxis at list.ru
Wed Aug 20 19:29:00 MSD 2008
On Wednesday 20 August 2008, Reinis Rozitis wrote:
> > it is expected
> >
> > if you don't like php's 404 page
> > set fastcgi_intercept_errors to on
>
> I see.
>
> Just switching from lighty where the default behaviour is first to check
> the local file ( lighttpd has an extra setting 'check-local' where you can
> specify to look for the file on local disk rather than blindly forwarding
> to request on the fastcgi backend )
>
> Although this is handy in case of remote fastcgi backends isnt the majority
> setups where the nginx and php (and other fastcgi processes) are on the
> same box? And as the php is the slowest component wouldnt it be more
> efficient from the performance point of view for the nginx throw the error
> first rather than intercepting the error later (and maybe add a
> setting/feature (mimic to lighty) to disable the local file check)..
>
> Anyways thx for the hint.
>
> rr
you can use ngx_http_rewrite_module
if (!-f $request_filename) {
return 404;
}
fastcgi_pass ...
but it's not recommended
More information about the nginx
mailing list