location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$ {
expires 4w;
root /var/www/public_html;
}
proxy_intercept_errors on;
proxy_cache STATIC;
proxy_cache_min_uses 5;
proxy_cache_valid 1d;
proxy_ignore_client_abort on;
proxy_temp_path /tmp;
proxy_cache_use_stale updating;
## Serve static
## root укажите, если надо
## такая регулярка лучше
location ~* \.(?:js|css|png|jpe?g|gif|ico|htc)$ {
expires max;
access_log off;
log_not_found off;
}