server {
   server_name {{config.apixtribeDNS}};
   add_header X-Request-ID $request_id; # Return to client
   add_header Access-Control-Allow-Origin *;
   add_header Access-Control-Max-Age 3600;
   add_header Access-Control-Expose-Headers Content-Length;
   add_header Access-Control-Allow-Headers Range;

   access_log  /media/phil/usbfarm/apixtribe/tmp/nginx/apixtribe.crabdance.access.log main;

   #location = /app {
   #  return 302 /app/;
   #}
   location /app/ {
     rewrite /app/(.*$) /$1 break;
     proxy_set_header        Host $host;
     proxy_set_header        X-Real-IP $remote_addr;
     proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
     client_max_body_size    10m;
     client_body_buffer_size 128k;
     proxy_connect_timeout   90;
     proxy_send_timeout      90;
     proxy_read_timeout      90;
     proxy_buffers           32 4k;
     proxy_set_header X-NginX-Proxy true;
     proxy_pass http://localhost:3017;
     proxy_redirect off;
    }

   location / {
     root /media/phil/usbfarm/apixtribe/nationchains/;
     index apixtribe.html;
   }
    error_page  404              /media/phil/usbfarm/apixtribe/nationchains/error/404.html;
    error_page   500 502 503 504  /media/phil/usbfarm/apixtribe/nationchains/error/50x.html;
}

