32 lines
753 B
Plaintext
32 lines
753 B
Plaintext
# Don't cache appcache, document html and data.
|
|
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
|
|
expires -1;
|
|
}
|
|
|
|
# Cache RSS and Atom feeds.
|
|
location ~* \.(?:rss|atom)$ {
|
|
expires 1h;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
# Caches images, icons, video, audio, HTC, etc.
|
|
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public";
|
|
|
|
# Comment out these lines if you wish to record access/error logs for static files.
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
|
|
# Cache CSS and JavaScript.
|
|
location ~* \.(?:css|js)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public";
|
|
}
|
|
|
|
# Don't record access/error logs for robots.txt.
|
|
location = /robots.txt {
|
|
log_not_found off;
|
|
access_log off;
|
|
} |