Welcome! Log In Create A New Profile

Advanced

Re: 404 instead of "no inout file specified"?

July 07, 2009 02:09PM
On Wed, Jul 8, 2009 at 12:47 AM, Leechael Yim<yanleech@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
Subject Author Posted

404 instead of "no inout file specified"?

Nuno Magalhães July 01, 2009 09:52AM

Re: 404 instead of "no inout file specified"?

Roxis July 01, 2009 10:01AM

Re: 404 instead of "no inout file specified"?

Maxim Dounin July 01, 2009 10:20AM

Re: 404 instead of "no inout file specified"?

Leechael Yim July 07, 2009 01:47PM

Re: 404 instead of "no inout file specified"?

edogawaconan July 07, 2009 02:09PM

Re: 404 instead of "no inout file specified"?

Leechael Yim July 07, 2009 02:30PM

Re: 404 instead of "no inout file specified"?

Maxim Dounin July 07, 2009 03:38PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready