upload files?

Igor Sysoev is at rambler-co.ru
Sun Sep 6 21:27:45 MSD 2009


On Sun, Sep 06, 2009 at 03:29:48AM -0400, ronin wrote:

> I use nginx 07.61 upload files Often fail???using normal apache
> nginx.conf:
> server_names_hash_bucket_size 128;
>   client_header_buffer_size 32k;
>   large_client_header_buffers 4 32k;
>   client_max_body_size 8m;
>   sendfile on;  
>   tcp_nopush     on;
> server_name_in_redirect off;   
>   server_tokens off;  
> 
>   keepalive_timeout 75 20;
>   tcp_nodelay on;   
> 
>   fastcgi_connect_timeout 300;
>   fastcgi_send_timeout 300;
>   fastcgi_read_timeout 300;
>   fastcgi_buffer_size 64k;
>   fastcgi_buffers 4 64k;
>   fastcgi_busy_buffers_size 128k;
>   fastcgi_temp_file_write_size 128k;
>   proxy_temp_path            /dev/shm/proxy_temp;
>   fastcgi_temp_path          /dev/shm/fastcgi_temp;
>   client_body_temp_path      /dev/shm/client_body_temp;
> 
> nginx Compile 
> ./configure --user=user --group=user --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-md5=/usr/lib --with-sha1=/usr/lib --with-http_gzip_static_module
> 
> How should I do?

First, you do not need
    --with-md5=/usr/lib --with-sha1=/usr/lib
since
  --with-md5=DIR                     set path to md5 library sources
  --with-sha1=DIR                    set path to sha1 library sources

Second, "/dev/shm/..." files are files in memory. There is no sense to
create temporary files in memory. If you have a lot of memory, it's better
to increase client_body_buffer_size, number of fastcgi_buffers, etc.,
and to leave really large temporary files on disk.


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list