一开始觉得是权限问题,可是更改后无效nginx
在nginx.conf文件中加入以下配置 而后重启nginx便可生效,如需别的格式 自行添加code
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico|eot|otf|ttf|woff|woff2)$ { expires 30d; access_log off; }