玩玩负载均衡---在window与linux下配置nginx
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|html|htm|css)$ { #指定缓存文件类型 expires 7d; #设置浏览器过期时间7天root data/nginx_cache/iis; #静态文件根目录目录(必须对应proxy_temp_path)
proxy_store on; #开启缓存机制
proxy_store_access user:rw group:rw all:rw; #缓存读写规则
proxy_temp_path data/nginx_cache/iis; #存放静态文件的缓存目录
# include proxy.conf; # 外联proxy理的详细配置如proxy_set_header, client_max_body_size .
if (!-e $request_filename) {
proxy_pass http://10.0.2.136;/
}
}
页:
[1]