带时间戳的nginx反向代理缓存

时间:2014-01-03 17:04:18

标签: nginx proxy

我想通过IE

按照以下URL请求缓存jpg和swf文件

http://www.xxxx.com/abc.jpg?stamp=1388735064848

http://www.xxxx.com/def.swf?stamp=1388735064848

哪个邮票= [值]每秒更改

我试过

location ~* .(jpg|swf|)(\?stamp=[0-9.]+)?$ {
 {
    proxy_cache_valid 200 120m;
    proxy_cache one;
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://IP;
 }

但它无法正常工作

0 个答案:

没有答案