jeudi 18 juin 2015

Issue serving Ember app using nginx

This nginx config:

rewrite ^ /index.html break;
try_files $uri $uri/ =404;

serves my site correctly, including / and /blog. However, it does not serve static files like robots.txt (I think this is because try_files is never executed?)

This nginx config:

try_files $uri /index.html?/$request_uri;

servers static files, as well as the root url / . However, it returns a 404 for any deeper url like /blog

Please help - I don't understand why this is occurring?

Aucun commentaire:

Enregistrer un commentaire