nginx 1.9.14 & upload-progress-module

deniss nginx-forum на forum.nginx.org
Ср Апр 13 16:31:22 UTC 2016


Вот конфиг:


  1 ## Config
  2 
  3 server {
  4         listen                          xxx.xxx.xxx.xxx:80;
  5         server_name                     share.example.com;
  6         upload_set_form_field           $upload_field_name.name
"$upload_file_name";
  7         upload_set_form_field           $upload_field_name.mime
"$upload_content_type";
  8         upload_set_form_field           $upload_field_name.path
"$upload_tmp_path";
  9         upload_aggregate_form_field     $upload_field_name.sha
"$upload_file_sha1";
 10         upload_aggregate_form_field     $upload_field_name.size
"$upload_file_size";
 11         upload_pass_form_field                                 
"^desc$|^folder_id$";
 12         upload_store                    /mnt/files/tmp;
 13         upload_cleanup                  400-599;
 14         error_log                       /var/logs/share_nginx_error.log
debug;
 15 
 16         location / {
 17         proxy_pass                      http://127.0.0.1:80;
 18         proxy_set_header                Host $host;
 19         proxy_set_header                X-Real-IP $remote_addr;
 20         proxy_set_header                X-Forwarded-For
$proxy_add_x_forwarded_for;
 21         track_uploads                   proxied 30s;
 22         proxy_pass_header               Authorization;
 23         access_log                     
/var/logs/share_nginx_access.log;
 24         }
 25 
 26         location /doupload {
 27         upload_pass                     /doneupload;
 28         track_uploads                   proxied 30s;
 29 #       access_log                     
/var/log/share_nginx_access.log;
 30         }
 31 
 32         location /doneupload {
 33         proxy_pass                      http://127.0.0.1:80/doupload;
 34         proxy_set_header                Host $host;
 35         proxy_set_header                X-Real-IP $remote_addr;
 36         proxy_set_header                X-Forwarded-For
$proxy_add_x_forwarded_for;
 37 #       access_log                     
/var/log/share_nginx_access.log;
 38         }
 39 
 40         location /media {
 41         root                            /var/www/share;
 42 #       access_log                     
/var/log/share_nginx_access.log;
 43         }
 44 
 45         location /error {
 46         root                            /var/www/error/;
 47         }
 48 
 49         location ^~ /progress {
 50         expires                         off;
 51         add_header                      Pragma no-cache;
 52         add_header                      Cache-Control
no-cache,must-revalidate;
 53         report_uploads                  proxied;
 54 #       access_log                     
/var/log/share_nginx_access.log;
 55         }
 56 
 57         location /uploaded_files {
 58         root                            /mnt/files;
 59         internal;
 60 #       limit_conn                      one 5;
 61 #       directio                        1m;
 62 #       access_log                     
/var/log/share_nginx_access.log;
 63         }
 64 
 65         location /previews {
 66         root                            /mnt/files;
 67         }
Ъ

Posted at Nginx Forum: https://forum.nginx.org/read.php?21,266053,266162#msg-266162



Подробная информация о списке рассылки nginx-ru