I have two backbone applications and one API on the same subdomain but i am having trouble making pushStates work for the applications with correct location regex.
This is the paths im trying to accomplish
subdomain.domain.org/admin
subdomain.domain.org/client
subdomain.domain.org/api
I have tried to configure rewrite rules for client and admin but it always fail with 404 or 500 error. What would be the correct way to do this?
Here is just one example of all the combinations i have tried:
location ~ ^/admin.*$ {
alias /var/www/project/admin/public
rewrite ^(.+)$ /index.html last;
}
I figured it out after reading this https://serverfault.com/questions/361159/nginx-multiple-location-issues#361426
and ended up with this: