Skip to content

Commit

Permalink
Clean up cache expires directives in nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Barnes authored and Divya Manian committed Dec 5, 2010
1 parent 8905574 commit eefe8d9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,12 @@ http {
access_log logs/static.log;
}

location ~* ^.+\.(ico|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
# Only set expires max IFF the file is a static file and exists
if (-f $request_filename) {
expires max;
root /sites/example.com/public;
access_log logs/static.log;
}
# Set expires max on static file types
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm)$ {
expires max;
root /sites/example.com/public;
access_log logs/static.log;
}
}
}

0 comments on commit eefe8d9

Please sign in to comment.