proxy_connect_timeout 600; #nginx跟后端服务器连接超时时间(代理连接超时)
proxy_read_timeout 600; #连接成功后,后端服务器响应时间(代理接收超时)
proxy_send_timeout 600; #后端服务器数据回传时间(代理发送超时)
proxy_buffer_size 32k; #设置代理服务器(nginx)保存用户头信息的缓冲区大小
proxy_buffers 4 32k; #proxy_buffers缓冲区,网页平均在32k以下的话,这样设置
proxy_busy_buffers_size 64k; #高负荷下缓冲大小(proxy_buffers*2)
proxy_temp_file_write_size 16k; #设定缓存文件夹大小,大于这个值,将从upstream服务器传
location ~ \.html$ { add_header 'Cache-Control' 'no-cache'; } location ~ \.(js|css|gif|jpg|jpeg|png|bmp|swf)$) { access_log off; expires 7d; }
no-cache
#keepalive_timeout 0;
etag off;
#expires -1;
add_header Cache-Control max-age=0;
add_header Cache-Control must-revalidate;
add_header Cache-Control no-store;
add_header Cache-Control no-cache;
static
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico|rar|zip|txt|flv|mid|doc|ppt|pdf|xls|mp3|svg|wma|woff|ttf)$ {
root /zjsweb/static;
keepalive_timeout 0;
add_header Cache-Control max-age=31536000;
}
注意:本文归作者所有,未经作者允许,不得转载
