Nginx configuration to cache angular app files
You need to make sure that the "root" defined in the server section matches what you want. Or define "root" under your regex location location ~* \.(jpg|jpeg|png|gif|swf|svg|ico|mp4|eot|ttf|otf|woff|woff2|css|js)$
. Without a root defined there nginx may be reverting to global definition under the server section.