Forwards requests to index.html after no file or folder was found

Useful for SPA's like AngularJS where the SPA's router takes care of the routing.
This commit is contained in:
Matthias Langhard 2016-06-28 13:45:23 +02:00 committed by GitHub
parent afa0a94343
commit bb6e9d398d
1 changed files with 4 additions and 0 deletions

View File

@ -19,5 +19,9 @@ http {
root /app/www;
<% end %>
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
}