<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On 28 May 2014, at 08:55, Peter Mescalchin <<a href="mailto:peter.mescalchin@gmail.com">peter.mescalchin@gmail.com</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Thanks Igor,</div><div><br></div><div>   I had explored that method already, sadly (as you know) "alias" is given as an absolute path meaning I can't use this block of config within multiple virtual hosts which I include; - would have to re-write this same block of config for each Virtual host modifying the alias path prefix.</div>
<div><br></div><div>And since alias man page explicitly states that $document_root can't be used it's not possible to complete this config in a reusable way. (e.g. alias $document_root/path/to/$1/$2; would be perfect).</div>
<div><br></div><div>Alas, I think what I have (storing the captures in temp vars) is the only real solution thus far.</div><div><br></div><div>Unless the penny hasn't dropped in my head? :)</div></div></blockquote><div><br></div>Then you can set these variable directly in regex:<br>location ~ "^/[a-f0-9]{16}/(<?resource_type>css|js)/(<?resource_path>.+)” {</div><div><br></div><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br>--   <br>Igor Sysoev<br><a href="http://nginx.com">http://nginx.com</a></div></div>
</div>
<br></body></html>