31 messages in ru.sysoev.nginxRe: error_page and named locations
FromSent OnAttachments
cynixDec 10, 2008 6:32 am 
cynixDec 10, 2008 7:51 am 
Igor SysoevDec 10, 2008 8:11 am.fastcgi
Almir KaricDec 10, 2008 8:28 am 
Igor SysoevDec 10, 2008 8:49 am 
cynixDec 11, 2008 2:09 am 
Igor SysoevDec 11, 2008 2:51 am 
Igor SysoevDec 11, 2008 3:09 am 
Phillip B OldhamDec 11, 2008 3:47 am 
Igor SysoevDec 11, 2008 4:31 am 
cynixDec 11, 2008 4:39 am 
Jean-Philippe MoalDec 11, 2008 5:55 am 
Jim OhlsteinDec 11, 2008 6:07 am 
Igor SysoevDec 11, 2008 6:18 am 
Igor SysoevDec 11, 2008 8:09 am 
Ezra ZygmuntowiczDec 11, 2008 8:34 am 
mikeDec 11, 2008 10:51 am 
Igor SysoevDec 11, 2008 11:55 am 
Jean-Philippe MoalDec 11, 2008 12:44 pm 
mikeDec 11, 2008 2:18 pm 
Igor SysoevDec 12, 2008 12:13 am 
mikeDec 12, 2008 12:54 am 
Igor ClarkDec 12, 2008 1:49 am 
Igor SysoevDec 12, 2008 3:12 am 
Igor ClarkDec 12, 2008 7:05 am 
Igor SysoevDec 12, 2008 7:31 am 
Mark AlanDec 12, 2008 8:22 am 
Ezra ZygmuntowiczDec 12, 2008 9:00 am 
KT WalrusDec 12, 2008 2:01 pm 
Igor ClarkDec 12, 2008 2:06 pm 
MerlinJan 2, 2009 11:08 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: error_page and named locationsActions...
From:cynix (cyn@cynix.org)
Date:Dec 11, 2008 2:09:33 am
List:ru.sysoev.nginx

Igor Sysoev <is@...> writes:

You may want to add this here:

log_not_found off;

Yes I have that line there. Since it's not related to the problem at hand I left it out for simplicity's sake.

The attached patch fixes the bug.

Thanks Igor, the patch works as intended.

I'd also like your opinion on another way to do the same thing.

location ~ \.php$ { set $script_filename $document_root$fastcgi_script_name; if (!-f $script_filename) { set $script_filename $document_root/index.php; } fastcgi_pass 127.0.0.1:1234; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $script_filename; }

Is this a better way to handle requests to non-existent PHP files? This way nginx takes care of checking if the file exists, and if it doesn't exist the original request is not passed to FastCGI at all. Only 1 request is passed to FastCGI, but with the addition of file existence checking. Will this yield better performance than 2 requests to FastCGI?