question about proxy_store

Cliff Wells cliff at develix.com
Mon Jan 28 13:11:24 MSK 2008


On Mon, 2008-01-28 at 12:36 +0300, Igor Sysoev wrote:
> On Mon, Jan 28, 2008 at 10:55:19AM +0200, Volodymyr Kostyrko wrote:
> 
> > eliott wrote:
> > >I am having problems with proxy being unable to store pages that do
> > >not have a file extension (such as a directory or "nice url").
> > >
> > >1. User requests http://domain.com/page/hello/
> > >2. nginx looks in the root, can not find the page.
> > >3. nginx uses the error page, which then calls a proxy pass inside a 
> > >location
> > >4. nginx fetches the page.
> > >5. nginx cannot save the results, because it is /page/hello/
> > >   nginx does create the /page/hello/ directory inside the proxy_store
> > >directory though.
> > 
> >         location /{
> >                 proxy_pass http://somewhere.com/;
> >                 proxy_set_header X-Real-IP $remote_addr;
> >                 proxy_store /home/arcade/www2/$uri#;
> >                 proxy_set_header Host $host;
> >         }
> > 
> > Trick is to add some symbol to any path making any url a valid file 
> > link. If we do select symbol which would not come in uri at any case we 
> > can use as escape symbol.
> > 
> > Works for me.
> 
> I do no think that http://domain.com/page/hello/%23 is "nice URL".


But how will the browser ever see the %23 in this case?  I assume it
doesn't, so does it make any difference how "nice" it is?

Regards,
Cliff







More information about the nginx mailing list