title: How to make nginx to stop processing other rules and serve a specific location?
body: <p>I have this config that works as expected in an empty <code>server { }</code> definition</p>
  
  <pre class="lang-regex prettyprint-override"><code>location ^~ /foo/ {
      alias /var/www/foo/;
  }
  </code></pre>
  
  <p>But when I move this in a considerably bigger server definition (one used for a WordPress multi-site config), it will stop  working and wordpress will respond to it (which obviously was not my intent).</p>
  
  <p>I tried to put at the begining or end of server block, but this didn't change it. </p>
  
  <p>How can I force Nginx to use this location?</p>