3

Rewriting nginx - keeping static files

view full story
linux-howto

http://serverfault.com – So I am trying to figure out how I should configurate nginx to rewrite all requests to my index.html file - keeping access to static files on the same server. I can get either to work in the below shown configuration snippet, but not both at once. What am I doing wrong? location / { root /var/www/frontend; #rewrite ^ /index.html break; // Static files wont work try_files $uri $uri/ /index.html; // Static files will work but no rewriting } (HowTos)