Hi all,

If the site is started by './manager runserver', I can download file from 
the site successfully. But the strange is that I can not download file from 
it when it deployed using nginx and uwsgi.  It just return part (25KB) of 
the whole file(1MB).
does anyone know how to fix this?

here is the config file:
{{{ # uwsgi.xml
<uwsgi>
  <socket>/tmp/uwsgi.sock</socket>
  <chmod-socket>666</chmod-socket>
  <module>django_wsgi</module>
  <processes>4</processes>
  <master/>
  <harakiri>20</harakiri>
  <home>/home/k4/Envs/k4</home>
  <daemonize>/home/k4/uwsgi/uwsgi.log</daemonize>
  <pidfile>/home/k4/uwsgi/uwsgi.pid</pidfile>
  <pythonpath>/home/k4/k4</pythonpath>
</uwsgi>
}}}

{{{ # nginx config
user  k4;
worker_processes  2;

error_log  logs/error.log;

events {
    worker_connections  1024;
}


http {
    server_names_hash_bucket_size  64;

    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    gzip  on;
    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;


    server {
        listen       80;
        server_name  localhost;

        location /media/ {
            root /home/k4/k4;
            expires max;
        }

        location / {
            uwsgi_pass   unix:///tmp/uwsgi.sock;
            include uwsgi_params;
        }

    }

}
}}}

{{{ # uwsgi_param
user  k4;
worker_processes  2;

error_log  logs/error.log;

events {
    worker_connections  1024;
}


http {
    server_names_hash_bucket_size  64;

    include       mime.types;
    default_type  application/octet-stream;

    sendfile        on;
    keepalive_timeout  65;

    gzip  on;
    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;


    server {
        listen       80;
        server_name  localhost;

        location /media/ {
            root /home/k4/k4;
            expires max;
        }

        location / {
            uwsgi_pass   unix:///tmp/uwsgi.sock;
            include uwsgi_params;
        }

    }

}
}}}
}}}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to