sendfile on | off;默认off(http\server\location\if in location) tcp_nopush on | off;默认off(http\server\location)sendfile开启的状况下,提升网络包的传输效率 tcp_nodelay on | off;默认on(http\server\location)keepalive链接下,提升网络传输的实时性
gzip on | off;默认off(http\server\location\if in location) 压缩传输 gzip_comp_level level;默认level=1(http\server\location) 压缩等级 gzip_http_version 1.0 | 1.1;默认1.1(http\server\location) gzip_types text/plain被压缩的格式
http_gzip_static_modele 预读gzip功能(经过文件名调用相应的gz压缩包)node
gzip_static on;
expires: 24h;在响应头中添加Cache-control:max-age=86400并返回expires头
add_header name value(http\server\location\if in location) 如:add_header Access-Control-Allow-Origin 域名;
http_refernginx
valid_referers none | blocked | server_names | string ...;(server\location) 如:valid_referers none blocked 域名;域名能够使用匹配的方式设置,~ if($invalid_referer){ return 403; }