nginx配置反向代理,文件上傳模塊


upstream tornado{
server 127.0.0.1:8000;
}
server {
listen 80;
server_name render.infra.lzyco.com;
location /upload {
upload_pass /uploadFile;
upload_store /tmp/tornado;
# upload_limit_rate 1024k;
upload_set_form_field "${upload_field_name}_name" $upload_file_name;
upload_set_form_field "${upload_field_name}_content_type" $upload_content_type;
upload_set_form_field "${upload_field_name}_path" $upload_tmp_path;
upload_aggregate_form_field "${upload_field_name}_md5" $upload_file_md5;
upload_aggregate_form_field "${upload_field_name}_size" $upload_file_size;
upload_pass_form_field "^submit$|^description$";

client_max_body_size 1000m;

}

location /uploadFile {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_set_header X_Real_IP $remote_addr;
proxy_set_header X-Scheme $scheme;

proxy_pass http://tornado;
}

location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_set_header X_Real_IP $remote_addr;
proxy_set_header X-Scheme $scheme;

proxy_pass http://tornado;
client_max_body_size 1000m;
}

}


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM