title: How to write nginx rules/regexes to match empty non empty path
body: <p>I want to have an nginx rule that will proxy requests with empty path <code>/</code> to a back end server, and another rule that match non empty paths, ex. <code>http://mysite/x/y/z</code></p>
  
  <p>The following two rules do not do this, the second one is catching all: </p>
  
  <pre><code># empty path
  location ^/?$ {
      proxy_pass   http://127.0.0.1:8000;
  }
  
  location / {
      expires -1;
      alias /var/static-site/;
  }
  </code></pre>
  
  <p>I have tried <code>/.*/</code> for the second rule, without success...</p>