Problems with some rewrite
Igor Sysoev
igor at sysoev.ru
Wed Aug 25 02:00:29 MSD 2010
On Tue, Aug 24, 2010 at 08:52:55AM -0400, revirii wrote:
> Igor Sysoev Wrote:
> -------------------------------------------------------
> > You DO need the locations, but you DO NOT need the
> > rewrites.
>
> ok.
>
> > Why do you use space in "([0-9] {2}" ?
>
> Because space was used here:
> http://wiki.nginx.org/NginxHttpRewriteModule#rewrite
I think this is a bug in markup.
> > Here is example for 2 numbers location:
> >
> > # 2 numbers
> > location ~ ^/img/default/-?(\d{2})/.+\.(.+)$
> > {
> > alias
> > /home/images/public/$1x/xxx/$1/default.$2;
> > }
>
> Hm, what is \d{2}? Is there any documentation? And:
>
> [code]
> nginx -t
> 2010/08/24 14:40:25 [emerg] 7386#0: pcre_compile() failed: missing ) in
> "^/img/default/-?(\d"
> 2010/08/24 14:40:25 [emerg] 7386#0: the configuration file
> /etc/nginx/nginx.conf test failed
> [/code]
>
> I put it into "...":
>
> [code]
> location ~ "^/img/default/-?(\d{2})/.+\.(.+)$"
> [/code]
>
> But then i see:
>
> [code]
> 2010/08/24 14:48:34 [emerg] 7449#0: the "alias" directive may not be
> used inside location given by regular expression
> 2010/08/24 14:48:34 [emerg] 7449#0: the configuration file
> /etc/nginx/nginx.conf test failed
> [/code]
>
> Whats wrong now?
Get 0.8.49 version. It's stable enough. At least I use it on my job site
www.rambler.ru.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list