<div dir="ltr">Hi there,<div><br></div><div>I use nginx as caching reverse proxy.</div><div><br></div><div>I have requests coming as  /something/data1/request123.xml</div><div>I have other requests coming in as /something/data1/bigfile424.bin</div><div><br></div><div>I want to forward all requests to an origin on /data1/</div><div><br></div><div>Currently I use a location block: </div><div><br></div><div>location /something/ {</div><div>  proxy_cache disk_cache;</div><div>  proxy_pass   <a href="http://origin/data1/">http://origin/data1/</a>;</div><div>}</div><div><br></div><div>This works great! Except the disk is rather slow and while the bin files are mostly static and can be cached pretty good, the xml files, which receive an awful lot of requests, update rather quickly. I prefer to cache them on a FAST disk cache (or rather on a tmpfs partition). So now I would try;</div><div><br></div><div>location /something/ {<br>  proxy_cache disk_cache;<br>  proxy_pass   <a href="http://origin/data1/">http://origin/data1/</a>;</div><div>  location ~* \.xml$ {</div><div>    proxy_cache fast_disk_cache;</div><div>    proxy_pass <a href="http://origin/data1">http://origin/data1</a>;</div><div>  }<br>}<br></div><div><br></div><div>As we know, proxy_pass does not inherit so I have to specify it also in the nested location. But I can't use proxy_pass like this with a URI in a location block containing a regex. And I can't make a location block for a mimetype, or using another specifier than regexes to filter out requests to certain 'file types'. Is there any other 'good' solution except for, on my origin adding rewrites from /something/data1/ to /data1/?</div><div><br></div><div>--</div><div>Michiel</div></div>