use proxy store with url parameters

Eden Li eden at mojiti.com
Sat Feb 2 10:28:51 MSK 2008


Try replacing `/fetch/$args` in your `proxy_store` statement with ` 
$request_uri`.  It should already be rewritten from the `error_page`  
statement.

e.g.

-               proxy_store /var/www/data/fetch$args;
+               proxy_store /var/www/data$request_uri;

On Feb 2, 2008, at 2:47 AM, Casey Rayman wrote:

> I have been trying to get proxy_store to work with a url of the  
> form /resource?resourceId=XXX where XXX is a number.  This url  
> actually returns a graphic from a database which does not change  
> often.  Is is possible to have proxy store work in this case where  
> the XXX is the only part of the URL which is any different?
>
> My most recent attempt:
>
>        location /resource {
>                root /var/www/data/fetch;
>                error_page 404 = /fetch$args;
>        }
>        location ^~ /fetch/ {
>                internal;
>                proxy_pass  http://10.0.3.197:8246;
>                proxy_store /var/www/data/fetch$args;
>                proxy_store_access user:rw group:rw all:r;
>        }
>
>
> Regards,
> Casey






More information about the nginx mailing list