When I try to cache static files for the user, using
location ~* \.(js|css|png|jpg|jpeg|gif|ico|bmp|ttf|tof|svg|swf)$ {
expires max;
access_log off;
error_log off;
}
The static files do not load (and give 403 Forbidden when accessed), so my site loads without any of those static files. When I comment out that part, everything works as should.
Can anyone explain why this is happening?