标签:
location / {
                error_log /tmp/error.log;
                include proxy.conf;
                expires max;
                proxy_store on;
                proxy_store_access user:rw group:rw all:rw;
                proxy_temp_path /data1/wwwroot/img.yuanfenba.net/;
                if (!-f $request_filename) {
                        proxy_pass    http://img_yfb;
                }
                index  index.html index.htm;
                #image_filter_buffer 8M;
                #try_files /uploads/$1.jpg /uploads/$1.jpg;
        }
proxy_redirect off ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 50m;
client_body_buffer_size 256k;
proxy_connect_timeout 30;
proxy_send_timeout 30;
proxy_read_timeout 60;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_max_temp_file_size 128m;
proxy_next_upstream http_502 http_504 error timeout invalid_header;
    #location ~* /uploads/photo/(.+)_(\d+)x(\d+)\.(jpg|gif|png)$ {            
        #       set $h $2;
        #       set $w $3;
        #       rewrite /uploads/photo/(.+)_(\d+)x(\d+)\.(jpg|gif|png)$ /uploads/photo/$1.$4 last;
        #       #image_filter test;
        #       image_filter_buffer 2000M;                          
        #       image_filter resize $h $w;
        #       try_files /uploads/photo/$1.$4  /img/notfound.jpg;      
        #}
标签:
原文地址:http://www.cnblogs.com/shengshuai/p/4242483.html