Skip to content

Instantly share code, notes, and snippets.

@eagleon
Created September 2, 2017 12:22
Show Gist options
  • Save eagleon/7ec006db7a2b9f0033afded8f116c076 to your computer and use it in GitHub Desktop.
Save eagleon/7ec006db7a2b9f0033afded8f116c076 to your computer and use it in GitHub Desktop.
Nginx expire 时间单位
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
etag off; #关闭etag
expires 1d; #有效期一天
# expires的单位可以使用
# ms: 毫秒
# s: 秒
# m: 分钟
# h: 小时
# d: 天
# w: 星期
# M: 月 (30 天)
# y: 年 (365 天)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment