Hello!
I'm trying to set up upload module + upload pogress module. I have this config:
server {
listen 80;
server_name srv.rapid.loc;
# Define root
set $fs_webroot "/home/coconut/public_html/project/srv";
root $fs_webroot;
index index.php;
# robots.txt
location = /robots.txt {
alias $fs_webroot/deny.robots.txt;
}
# Domain root
location / {
try_files $uri $uri/ /index.php?$query_string;
if ($query_string ~ "r=upload&X-Progress-ID=") {
upload_pass /;
upload_limit_rate 1024;
upload_store /tmp/nginxupload;
upload_cleanup 400 404 499 500-505;
}
}
location ~ index.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $fs_webroot/$fastcgi_script_name;
include fastcgi_params;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param PATH_INFO $fastcgi_script_name;
add_header Pragma no-cache;
add_header Cache-Control no-cache,must-revalidate;
add_header Access-Control-Allow-Origin *;
track_uploads proxied 35s;
}
location ^~ /progress {
expires off;
add_header Pragma no-cache;
add_header Cache-Control no-cache,must-revalidate;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers "Content-Type, X-Requested-With, X-File-Name";
report_uploads proxied;
}
}
Upload form sent to this url:
http://srv.rapid.loc/?r=upload&X-Progress-ID=5d5f51c3b27c8af0c2eb512d59a3c821
File is uploading, speed limit is ok, but progress doesn't received. On this uploadprogress query:
http://srv.rapid.loc/progress/?X-Progress-ID=5d5f51c3b27c8af0c2eb512d59a3c821
Al the time this data is returned:
new Object({ 'state' : 'starting' })
/etc/nginx/nginx.conf:
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 1g;
# server_tokens off;
server_names_hash_max_size 2048;
server_names_hash_bucket_size 128;
upload_progress proxied 32m;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/project/*;
}
What problem can be?