在Nginx配置文件nginx.conf中 <server>内添加
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|css|js|eot|svg|ttf|woff|woff2|properties|json)$ {
root {资源根路径};
if (-f $request_filename) {
expires 1d;
break;
}
}