server {
  listen 8000;
  server_name localhost;

  root /Users/dmoore/projects/tutorials/angular-phonecat2/.build;
  access_log "/Users/dmoore/projects/tutorials/angular-phonecat2/logs/hotili-net.access.log";
  error_log  "/Users/dmoore/projects/tutorials/angular-phonecat2/logs/hotili-net.error.log";
  error_page 404 /app/404.html;
  error_page 403 /app/403.html;

  index index.html;

  # SEO
  if ($args ~ "_escaped_fragment_=/?(.+)") {
    set $path $1;
    rewrite ^ /snapshots/$path last;
  }

  location ~* \.(gif|jpg|jpeg|png|js|css)$ {
  }
        
  location / {
    allow 127.0.0.1;
    deny all;
    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;
  }
}