<p class="MsoNoSpacing">Hi all, </p>
<p class="MsoNoSpacing">I have some URL patterns that follow the same directive
specifications. </p>
<p class="MsoNoSpacing">E.g. sitemap.xml, robots.txt etc. follow the same
location directive with the same caching policy, invalidation etc. </p>
<p class="MsoNormal"><span style="font-size:9.0pt"> location /robots.txt {</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_pass <a href="http://localhost:82">http://localhost:82</a>;</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_set_header Host $host;</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_set_header X-Real-IP $remote_addr;</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_set_header Accept-Encoding
"";</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_ignore_headers Cache-Control;
</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_ignore_headers Expires; </span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_ignore_headers
X-Accel-Expires; </span></p>
<p class="MsoNormal"><span style="font-size:9.0pt">
proxy_cache cache;</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_cache_key $scheme$host$request_uri; </span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_cache_valid 200 302 2m;</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> proxy_cache_use_stale updating;</span></p>
<p class="MsoNormal"><span style="font-size:9.0pt"> }</span></p>
<p class="MsoNoSpacing">Now I have written separate directives for all of these
URL patterns. </p>
<p class="MsoNoSpacing">How can I combine them into one line? </p>
<p class="MsoNoSpacing">Can I do this? </p>
<p class="MsoNormal"><span style="font-size:10.0pt"> location /robots.txt, sitemap.xml,
~*.xml {</span></p>
<p class="MsoNoSpacing">etc. ? </p>
<p class="MsoNoSpacing"> </p>