expires [time]
location / {
root html;
#设置过期时间为10s
expires 10s;
}
expires @[time]
location / {
root html;
#设置过期时间为23点30分
expires @23h30m;
}
expires -[time]
location / {
root html;
#设置过期时间为前一小时即失效了
expires -1h;
}
expires epoch
location / {
root html;
#指定过期时间的值为 1 January,1970,00:00:01 GMT
expires epoch;
}
expires off
location / {
root html;
#默认值
expires off;
}
expires max
location / {
root html;
#设置过期时间为最长
expires max;
}