Бага или фича? if and try_files

Андрей Василишин a.vasilishin at kpi.ua
Fri Nov 16 00:39:01 UTC 2012


Есть такая конструкция, с включенным if, перестает работать try_files.
if заменили на двойной map, но все же хотелось бы знать это бага или фича?

location ~ \.(3gp|avi)$ {
	root /var/www;
         try_files
         	/site.com-st4$uri
                 /site.com-st6$uri
                 /site.com-st5$uri
                 /site.com-st3$uri
                 /site.com-st1$uri
                 /site.com-st2$uri
                 =404;
                 aio on;
                 directio  4k;
                 directio_alignment 4k;
                 output_buffers 1 2m;
		if ($http_user_agent ~* Wget|DVGet|Download){
			limit_rate  128K;
		}
}

2012/11/16 04:07:51 [debug] 15571#0: *18203 using configuration 
"\.(3gp|avi)$"
2012/11/16 04:07:51 [debug] 15571#0: *18203 http cl:-1 max:2102394880
2012/11/16 04:07:51 [debug] 15571#0: *18203 rewrite phase: 3
2012/11/16 04:07:51 [debug] 15571#0: *18203 http script var
2012/11/16 04:07:51 [debug] 15571#0: *18203 http script var: 
"Wget/1.13.4 (linux-gnu)"
2012/11/16 04:07:51 [debug] 15571#0: *18203 http script regex: 
"Wget|DVGet|Download"
2012/11/16 04:07:51 [notice] 15571#0: *18203 "Wget|DVGet|Download" 
matches "Wget/1.13.4 (linux-gnu)", client: 212.113.32.188, server: 
site.com, request: "GET /video/161112/drozd2012l1dvdrip1400mb_Mobile.avi 
HTTP/1.1", host: "site.com"
2012/11/16 04:07:51 [debug] 15571#0: *18203 http script if
2012/11/16 04:07:51 [debug] 15571#0: *18203 post rewrite phase: 4
2012/11/16 04:07:51 [debug] 15571#0: *18203 generic phase: 5
2012/11/16 04:07:51 [debug] 15571#0: *18203 generic phase: 6
2012/11/16 04:07:51 [debug] 15571#0: *18203 generic phase: 7
2012/11/16 04:07:51 [debug] 15571#0: *18203 access phase: 8
2012/11/16 04:07:51 [debug] 15571#0: *18203 access phase: 9
2012/11/16 04:07:51 [debug] 15571#0: *18203 post access phase: 10
2012/11/16 04:07:51 [debug] 15571#0: *18203 try files phase: 11
2012/11/16 04:07:51 [debug] 15571#0: *18203 content phase: 12
2012/11/16 04:07:51 [debug] 15571#0: *18203 content phase: 13
2012/11/16 04:07:51 [debug] 15571#0: *18203 content phase: 14
2012/11/16 04:07:51 [debug] 15571#0: *18203 http filename: 
"/var/www/video/161112/drozd2012l1dvdrip1400mb_Mobile.avi"
2012/11/16 04:07:51 [debug] 15571#0: *18203 add cleanup: 0000000000F87158
2012/11/16 04:07:51 [error] 15571#0: *18203 open() 
"/var/www/video/161112/drozd2012l1dvdrip1400mb_Mobile.avi" failed (2: No 
such file or directory), client: 212.113.32.188, server: site.com, 
request: "GET /video/161112/drozd2012l1dvdrip1400mb_Mobile.avi 
HTTP/1.1", host: "site.com"
2012/11/16 04:07:51 [debug] 15571#0: *18203 http finalize request: 404, 
"/video/161112/drozd2012l1dvdrip1400mb_Mobile.avi?" a:1, c:1
2012/11/16 04:07:51 [debug] 15571#0: *18203 http special response: 404, 
"/video/161112/drozd2012l1dvdrip1400mb_Mobile.avi?"
2012/11/16 04:07:51 [debug] 15571#0: *18203 http set discard body
2012/11/16 04:07:51 [debug] 15571#0: *18203 HTTP/1.1 404 Not Found
Server: nginx/1.2.4
Date: Fri, 16 Nov 2012 00:07:51 GMT
Content-Type: text/html
Content-Length: 168
Connection: keep-alive
-- 
WBR, Andrey Vasilishin CDIG1-UANIC, CDIG1-RIPE



Подробная информация о списке рассылки nginx-ru