Nginx多个图片路径配置
原创
©著作权归作者所有:来自51CTO博客作者源知原味Coder的原创作品,请联系作者获取转载授权,否则将追究法律责任
location ^~ /user/files/ {
expires 24h;
alias /project/upload/files/;#指定图片存放路径
access_log logs/file.access.log main ;#日志存放路径
proxy_store on;
proxy_store_access user:rw group:rw all:rw;
proxy_temp_path /project/upload/nginxtmp;#图片访问路径
proxy_redirect off;
#proxy_set_header Host 127.0.0.1;
client_max_body_size 100m;
client_body_buffer_size 1280k;
proxy_connect_timeout 900;
proxy_send_timeout 900;
proxy_read_timeout 900;
proxy_buffer_size 40k;
proxy_buffers 40 320k;
proxy_busy_buffers_size 640k;
proxy_temp_file_write_size 640k;
#if ( !-e $request_filename)
#{
# proxy_pass http://127.0.0.1;
#}
}