On Mon, Apr 28, 2014 at 01:22:08PM +0400, Vadim Lazovskiy wrote:
> Вопрос. Откуда берется домен в имени файла и как это побороть?
Выглядит как баг regex location + alias + limit_except/if.
Собственно, для случая if он уже давно задокументирован на http://wiki.nginx.org/IfIsEvil.
Патч, видимо, какой-то такой:
# HG changeset patch
# User Maxim Dounin <mdounin@xxxxxxxxxx>
# Date 1398709755 -14400
# Mon Apr 28 22:29:15 2014 +0400
# Node ID cf4f92f40290c9d3b8a8fb8cf836d3ebd16224f5
# Parent 539635cb8e98063b116555bdfd0c5ccfbfa8f184
Fixed alias in regex locations with limit_except/if.
The ngx_http_map_uri_to_path() function uses clcf->regex to detect if
it's working within a location given by a regular _expression_. Its
behaviour was incorrect due to clcf->regex being false in implicit locations
created by if and limit_except. Fix is to preserve clcf->regex within
implicit locations.