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; }