404 instead of "no inout file specified"?
Leechael Yim
yanleech at gmail.com
Tue Jul 7 22:30:10 MSD 2009
Some situation like, this moment, I got your email....
On Wed, Jul 8, 2009 at 2:09 AM, Edho P Arief <edhoprima at gmail.com> wrote:
> 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
>
>
--
Twitter: http://www.twitter.com/leechael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090708/c82ba679/attachment.html>
More information about the nginx
mailing list