nginx-0.7.18

Igor Sysoev is at rambler-co.ru
Tue Oct 14 12:25:17 MSD 2008


On Tue, Oct 14, 2008 at 04:10:58PM +0800, lhmwzy wrote:

> Also not right.
> I can not get the right thing.
> Can you give me an example?

You also need a "rewrite" to replace an URL with a link itself only:

   location /dl/
        secure_link_secret  lhm;
        if ($secure_link = "") {
            return 403;
        }
     }

     root  /path/to/files;

     rewrite  ^   $secure_link  break;
  }
   

> 2008/10/14 Anton Yuzhaninov <citrin at citrin.ru>:
> > On 14.10.2008 08:53, lhmwzy wrote:
> >>
> >> I have set a secure link:
> >>  location /dl/
> >>        {
> >>         secure_link_secret  lhm;
> >>            if ($secure_link == "") {
> >>                        return 503;
> >>             }
> >>        }
> >>
> >>
> >> Then
> >> md5(dllhm)=91fe55efd557140f7a32f7f7c1c74aa3
> >>
> >> Then access it through
> >> http://host/91fe55efd557140f7a32f7f7c1c74aa3/dl/,but get a 404.
> >>
> >
> > URL should be under location /d1/ e. g.
> >
> > http://host/d1/7a701b100383d50fc2995ed264add62a/some_url_to_protected_resource
> >
> > $ echo -n some_url_to_protected_resourcelhm | md5
> > 7a701b100383d50fc2995ed264add62a
> >
> > --
> >  Anton Yuzhaninov
> >
> >

-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list