#语法
Syntax: expires [modified] time;
expires epoch | max | off;
Default: expires off;
Context: http, server, location, if in location
#配置过期时间
[root@web01 ~]# vim /etc/nginx/conf.d/cacha.conf
server {
listen 80;
server_name linux.cache.com;
root /code/cache;
location ~* .(jpg|png|gif)$ {
root /code/cache;
expires 7d; #7天
}
}