From: Yuri Khachaturyan <yukh@yukh.ru>
To: "ALT Linux sysadmins' discussion" <sysadmins@lists.altlinux.org>
Subject: Re: [Sysadmins] Помогите с nginx rewrite
Date: Tue, 25 Jan 2011 21:21:15 +0300
Message-ID: <AANLkTimabgENJcmkSrPeLTzRCbs_kOBuSXFpaR6BdEst@mail.gmail.com> (raw)
In-Reply-To: <20110125181728.GA9535@utvuk.ender.rk>
25 января 2011 г. 21:17 пользователь Afanasov Dmitry
<ender@altlinux.org> написал:
>> Конфиг чего? Всего nginx или достаточно только секции server?
>>
>> rewrite "^/media/(.*)/(.*)/t/([0-9]+)/(.*)\.([a-z0-9]{3})$ /media/$1/$2/$4.$5?$3" break;
> какая прелесть. rewrite "..." "..." break
>
> а я б вообще переписал как
> rewrite "^(/media/.*/t/)(\d+)/(\d+\.\w{3})$ /$1/$3?$2" break;
>
Не помогло:
2011/01/25 21:18:17 [notice] 3107#0: *35
"^(/media/.*/t/)(\d+)/(\d+\.\w{3})$ /$1/$3?$2" does not match
"/media/video/air_subjects/2010-01/04/t/234234/12392.flv", client:
213.243.84.2, server: test.poisk.vid.ru, request: "GET
/media/video/air_subjects/2010-01/04/t/234234/12392.flv HTTP/1.1",
host: "test.poisk.vid.ru"
2011/01/25 21:18:17 [error] 3107#0: *35 open()
"/home/wm/www/media/video/air_subjects/2010-01/04/t/234234/12392.flv"
failed (2: No such file or directory), client: 213.243.84.2, server:
test.poisk.vid.ru, request: "GET
/media/video/air_subjects/2010-01/04/t/234234/12392.flv HTTP/1.1",
host: "test.poisk.vid.ru"
Файл реально лежит в /media/video/air_subjects/2010-01/04/12392.flv, с
помощью данного rewrite нужно преобразовать путь, который
запрашивается в этот и передать параметр через ?, который идет сразу
после /t/ ...
--
С уважением,
Хачатурян Юрий (yukh@yukh.ru)
next prev parent reply other threads:[~2011-01-25 18:21 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-25 13:20 Yuri Khachaturyan
2011-01-25 13:27 ` Денис Смирнов
2011-01-25 13:31 ` Yuri Khachaturyan
2011-01-25 13:32 ` Slava Dubrovskiy
2011-01-25 13:39 ` Yuri Khachaturyan
2011-01-25 15:52 ` Денис Смирнов
2011-01-25 15:56 ` Yuri Khachaturyan
2011-01-25 16:13 ` Yuriy Kashirin
2011-01-25 16:30 ` Yuri Khachaturyan
2011-01-26 3:09 ` Денис Смирнов
2011-01-25 16:38 ` Денис Смирнов
2011-01-25 16:42 ` Yuri Khachaturyan
2011-01-25 16:40 ` Денис Смирнов
2011-01-25 16:43 ` Yuri Khachaturyan
2011-01-25 18:17 ` Afanasov Dmitry
2011-01-25 18:21 ` Yuri Khachaturyan [this message]
2011-01-25 18:39 ` Afanasov Dmitry
2011-01-25 18:43 ` Yuri Khachaturyan
2011-01-25 18:47 ` Afanasov Dmitry
2011-01-25 18:48 ` Yuri Khachaturyan
2011-01-26 9:11 ` Yuriy Kashirin
2011-01-26 9:26 ` Yuri Khachaturyan
2011-01-26 12:48 ` Slava Dubrovskiy
2011-01-27 3:59 ` Дмитрий Дегтярев
2011-01-26 9:45 ` Michael Shigorin
2011-01-27 7:58 ` Yuriy Kashirin
2011-01-25 18:47 ` Yuri Khachaturyan
2011-01-26 3:07 ` Денис Смирнов
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimabgENJcmkSrPeLTzRCbs_kOBuSXFpaR6BdEst@mail.gmail.com \
--to=yukh@yukh.ru \
--cc=sysadmins@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git