缓存
location ~ .*\.(js|css|swf)$ {
expires 60d;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|ico)$ {
#valid_referers blocked *.fqxn.com;
#if ($invalid_referer) {
#rewrite ^ http://www.fqxn.com/403.jpg last;
#}
expires 8d;
}
压缩
gzip on;
gzip_min_length 1024;
gzip_types text/plain text/css application/x-javascript application/xml;
gzip on;
gzip_min_length 1024;
gzip_types text/plain text/css application/x-javascript application/javascript application/xml;
转载于:https://juejin.im/post/5aad0e6bf265da239e4dd9e0