﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
234	try_files with if	Sergey Gorelkin	somebody	"Существует проблема совместного использования правила if и try_files.
Вот пример конфигурационного файла.
        location ~ \.mp4$ {
                if ($args ~* download) {
                        add_header Content-Disposition ""attachment"";
                }
                mp4;
                expires -1;
                mp4_buffer_size     1m;
                mp4_max_buffer_size 40m;
                access_log /logs/nginx/access.log main;
                try_files /data2$uri $uri =404;
        }
Скачать файл в виде
http://server/1234/video.mp4
Но если добавить параметр
http://server/1234/video.mp4?download=true
То сервер отвечает ошибку 404

Ставим любой другой параметр файл отдается.

Убираем условие if. Файл можно скачать. 
Убираем if. Добавляем add_header. Тоже работает в любом варианте.
"	defect	closed	minor		nginx-core	1.2.x	duplicate			Linux russia3 3.2.0-27-generic #43-Ubuntu SMP Fri Jul 6 14:25:57 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux	"nginx version: nginx/1.2.1
built by gcc 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configure arguments: --prefix=/usr/nginx --with-cc-opt='-I /usr/include' --with-ld-opt='-L /usr/lib' --conf-path=/etc/nginx/conf/nginx.conf --sbin-path=/usr/sbin/nginx --pid-path=/var/run/nginx.pid --error-log-path=/var/log/nginx-error.log --user=www --group=www --with-ipv6 --http-client-body-temp-path=/var/tmp/nginx/client_body_temp --http-proxy-temp-path=/var/tmp/nginx/proxy_temp --http-log-path=/var/log/nginx-access.log --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_stub_status_module --with-pcre
"
