Welcome! Log In Create A New Profile

Advanced

Re: Upload Progress

Matt M
December 13, 2012 09:28AM
Hi! Thanks for the response.

On Wed, Dec 12, 2012 at 8:56 PM, Sokolov Evgeniy <ewgraf@gmail.com> wrote:
> Hi!
>
> If you compile your nginx with debug - enable debug logging, restart nginx
> and you will see messages from upload module, it is very helpful.
>
> Also read this note
> http://wiki.nginx.org/HttpUploadProgressModule#track_uploads - "The POST
> must have a query parameter called X-Progress-ID"... If the POST has no such
> information, the upload will not be tracked....

I have double checked and I can see the post variable X-Progress-ID
coming with the upload but the status just stays at starting. My
nginx.conf looks like this:
worker_processes 1;

events {
worker_connections 1024;
}


http {
#error_log /usr/local/nginx/logs/error.log debug;
include mime.types;
default_type application/octet-stream;

sendfile on;

tcp_nopush on;
tcp_nodelay off;

gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript
text/xml application/xml application/xml+rss text/javascript;

upstream modperl {
ip_hash;

server 127.0.0.1:8080;
}
client_body_timeout 10;
client_header_timeout 10;
client_max_body_size 3M;
keepalive_timeout 10;
send_timeout 10;
limit_conn_zone $binary_remote_addr zone=limit_per_ip:16m;

# reserve 1MB under the name 'proxied' to track uploads
upload_progress proxied 1m;
upload_progress_json_output;

# HTTP Server
server {
listen 80;
server_name _;

root /var/www/$host/;

limit_conn limit_per_ip 5;
proxy_buffering off;
## Only allow GET and HEAD request methods
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}


# Serve static files directly
location ~*
^(?!\/(internal_documents)).+\.(jpg|jpeg|gif|css|js|ico|html|swf|png|pdf|xls|xlsx|doc|docx)$
{
access_log off;
expires 30d;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

location / {
# needed to forward user's IP address to rails
proxy_set_header X-Real-IP $remote_addr;

# needed for HTTPS
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_max_temp_file_size 0;
proxy_read_timeout 600;


# If the file exists as a static file serve it directly without
# running all the other rewite tests on it
if (-f $request_filename) {
break;
}

proxy_pass http://modperl;
# track uploads in the 'proxied' zone
# remember connections for 30s after they finished
track_uploads proxied 30s;
}
location ^~ /progress {
# report uploads tracked in the 'proxied' zone
report_uploads proxied;
}
}

# HTTPS server - Without SSL Certificate
server {
listen 442;
server_name _;
limit_conn limit_per_ip 5;
proxy_buffering off;
## Only allow GET and HEAD request methods
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}
server_name_in_redirect off;

ssl off;

root /var/www/$host/;

# serve static files directly
location ~*
^(?!\/(internal_documents)).+\.(jpg|jpeg|gif|css|js|ico|html|swf|png|pdf|xls|xlsx|doc|docx)$
{
access_log off;
expires 30d;
break;
}

location / {
# needed to forward user's IP address to rails
proxy_set_header X-Real-IP $remote_addr;

# needed for HTTPS
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_max_temp_file_size 0;
proxy_read_timeout 600;


# If the file exists as a static file serve it directly without
# running all the other rewite tests on it
if (-f $request_filename) {
break;
}

proxy_pass http://modperl;
# track uploads in the 'proxied' zone
# remember connections for 30s after they finished
#track_uploads proxied 30s;
}
location ^~ /progress {
# report uploads tracked in the 'proxied' zone
report_uploads proxied;
}

}



}

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Upload Progress

Matt M December 11, 2012 05:20PM

Re: Upload Progress

Maxim Dounin December 12, 2012 03:38AM

Re: Upload Progress

Matt M December 12, 2012 07:12AM

Re: Upload Progress

ewgra December 12, 2012 09:58PM

Re: Upload Progress

Matt M December 13, 2012 09:28AM

Re: Upload Progress

ewgra December 14, 2012 03:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 210
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready