title: Always redirected to root folder when accessing AngularJS
body: <p>So I'm trying to run my angularJS app on the linux server, and when I access any url different from / the page is redirected to /, my config for nginx is:</p>
  
  <pre><code>server {
    server_name localhost;
  
    root /var/www/myproject/public;
  
    index index.html;
  
    location ~* \.(gif|jpg|jpeg|png|js|css)$ {
    }
  
    location / {
      allow 127.0.0.1;
      expires -1;
      add_header Pragma "no-cache";
      add_header Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
  
      try_files $uri $uri/ /index.html =404;
    }
  }
  </code></pre>
  
  <p>Just a fyi my app just doesn't make requests, just load a local json and navigate using #/page-name(the url is not going to nowhere, angular just use this to render templates in html, this templates is already inside html), nginx need config for accept urls with "#"? any config wrong in this snippet?</p>