title: nginx setup for angularjs and php5 rest
body: <p>I'm trying to run an angularjs application along with an php application.
  I made 2 folders ( client &amp; api ) and I uploaded all my angular app files in client and all my php rest api into "api" directory.</p>
  
  <p>I added into nginx: </p>
  
  <pre><code>location / {
        try_files $uri /client/index.html;
  }
  location /api/ {
        try_files $uri $uri/ /api/index.php$args;
  }
  location /static {
        alias /var/www/www.sitename.com/htdocs/client/static/;
  }
  </code></pre>
  
  <p>I'm wondering if is there a more elegant way to make this work, because right now if i want to add an exception to "location /" i need to go and modify nginx again.</p>
  
  <p>Please advise.</p>