404 instead of "no inout file specified"?
Edho P Arief
edhoprima at gmail.com
Tue Jul 7 22:09:50 MSD 2009
On Wed, Jul 8, 2009 at 12:47 AM, Leechael Yim<yanleech at gmail.com> wrote:
> <code lang="nginx">
> if (-f $request_filename) {
> fastcgi_pass 127.0.0.1:9000;
> }
> </code>
> OR:
> <code lang="nginx">
> if (!-f $request_filename) {
> return 404;
> }
> fastcgi_pass 127.0.0.1:9000;
> </code>
> The first one is what I current used with my Nginx.
location ~ \.php$ {
try_files $uri @404;
...
}
location @404 {
return 404; # or custom error page
}
when will people stop using !-f $request_filename...
--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
More information about the nginx
mailing list