<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Igor recommends using prefix locations as much as possible.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">If you were to use regex locations, you might want to embed them into prefix ones so order only matters at the leaves of the tree, which helps avoiding conflicts and makes you configuration scalable the most.<br><br>Here is a presentation by Igor himself about the latter:<a href="https://youtu.be/YWRYbLKsS0I"> https://youtu.be/YWRYbLKsS0I</a><br></div><div class="gmail_extra"><div><div class="gmail_signature"><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div></div>
<br><div class="gmail_quote">On Fri, Sep 4, 2015 at 2:01 PM, Brent Clark <span dir="ltr"><<a href="mailto:brentgclarklist@gmail.com" target="_blank">brentgclarklist@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Thank you ever so much.<br>
      <br>
      Regards<span class="HOEnZb"><font color="#888888"><br>
      Brent</font></span><div><div class="h5"><br>
      <br>
      On 04/09/2015 13:29, Sebastian Krebs wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <div class="gmail_quote">2015-09-04 12:04 GMT+02:00 Brent
            Clark <span dir="ltr"><<a href="mailto:brentgclarklist@gmail.com" target="_blank">brentgclarklist@gmail.com</a>></span>:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Good
              day Guys.<br>
              <br>
              I would like to ask if someone could please verify my
              configs :<br>
              <a href="http://pastebin.com/8Xk63RYD" rel="noreferrer" target="_blank">http://pastebin.com/8Xk63RYD</a><br>
              <a href="http://pastebin.com/EfNSpvMV" rel="noreferrer" target="_blank">http://pastebin.com/EfNSpvMV</a><br>
              <br>
              I have a Nginx server sitting in front of two Apache
              servers.<br>
              I'm using Nginx as a reverse caching / load balancing
              solution.<br>
              But what I'm trying achieve is to cache only for images,
              css and Js.<br>
              <br>
              All in all it appears it all works.<br>
              <br>
              The other question I would like to ask is, does the order
              of location<br>
              matter?<br>
            </blockquote>
            <div><br>
            </div>
            <div>Depends. For regular expression based location is does,
              for prefix based locations it doesn't. See <a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#location" target="_blank"></a><a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#location" target="_blank">http://nginx.org/en/docs/http/ngx_http_core_module.html#location</a></div>
            <div><br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">A
              location can either be defined by a prefix string, or by a
              regular expression. Regular expressions are specified with
              the preceding “~*” modifier (for case-insensitive
              matching), or the “~” modifier (for case-sensitive
              matching). <b>To find location matching a given request,
                nginx first checks locations defined using the prefix
                strings (prefix locations). Among them, the location
                with the longest matching prefix is selected and
                remembered. Then regular expressions are checked, in the
                order of their appearance in the configuration file. The
                search of regular expressions terminates on the first
                match, and the corresponding configuration is used. If
                no match with a regular expression is found then the
                configuration of the prefix location remembered earlier
                is used.</b><br>
            </blockquote>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
              If anyone can help, it would be appreciated.<br>
              <br>
              Thanks<br>
              Brent<br>
              <br>
              <br>
              <br>
              _______________________________________________<br>
              nginx mailing list<br>
              <a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
              <a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
            </blockquote>
          </div>
          <br>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <div><a href="https://github.com/KingCrunch" target="_blank">github.com/KingCrunch
            </a><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
nginx mailing list
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div></div>