1

I can not get the chunked uploading to work. Even after recompiling Nginx. I am using nginx 1.1.19 on ubuntu 12.04. I downloaded the source code of nginx 1.1.19 and module for chunked uploading and compiled it as follows.

./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --user=www-data --group=www-data --conf-path=/etc/nginx/nginx.conf --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_gzip_static_module  --with-http_ssl_module --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl **--add-module=path-to-chunkin-module --with-pcre=/path-to-pre-library.**

After compilation I got this :

Configuration summary   

+ using PCRE library: /home/www-data/pcre-8.10

+ using system OpenSSL library    + md5: using OpenSSL library    + sha1: using OpenSSL library   
+ using system zlib library

  nginx path prefix: "/etc/nginx" 

  nginx binary file: "/etc/nginx/sbin/nginx"
    nginx configuration prefix: "/etc/nginx"
    nginx configuration file: "/etc/nginx/nginx.conf"     nginx pid file: "/var/run/nginx.pid"  

 nginx error log file: "/var/log/nginx/error.log"     nginx http
access log file: "/var/log/nginx/access.log"     nginx http client
**request body temporary files: "client_body_temp"**

**nginx http proxy temporary files: "proxy_temp"** 

 nginx http fastcgi temporary files: "/var/lib/nginx/fastcgi"    
nginx http uwsgi temporary files: "uwsgi_temp"     nginx http scgi
temporary files: "scgi_temp"

Even though I don't want proxy module I couldn't remove it using --without-http_proxy-module. After that I restarted nginx.

nginx -V is showing compiled modules with chunkin modules and pcre. But chunk uploading is still not working. I configured sites-enabled/default and added

chunkin on;
    error_page 411 = @my_411_error;   location @my_411_error {
      chunkin_resume;   }

But still chunk uploading stays away. curl output showing :

curl -I ipaddress-of-server

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 17 Jul 2012 20:31:56 GMT
Content-Type: text/html
Content-Length: 4448
Last-Modified: Mon, 11 Jun 2012 18:02:19 GMT
Connection: keep-alive
Accept-Ranges: bytes 

I am getting 411 error in accesslogs.

ananthan
  • 1,490
  • 1
  • 17
  • 27
  • Please show the `curl` command you are testing with (i.e. how you are providing the chunked upload), and any relevant entries from the nginx access and error logs. – mgorven Jul 17 '12 at 23:11
  • The [chunkin module](http://wiki.nginx.org/HttpChunkinModule) is for chunked **uploads**, not downloads (which nginx supports directly). Your test `curl` is not uploading anything, so the chunkin module is not coming into play. – mgorven Jul 18 '12 at 04:51
  • How can i check chunk uploading is working?Will Header indicate anything relating that.When a video is uploading using chunk upload,its showing 411 in the nginx accesslog. POST /index1.php HTTP/1.1" 411 174 "-" – ananthan Jul 18 '12 at 04:58
  • Uh, so check that the video goes wherever it is supposed to go? – mgorven Jul 18 '12 at 05:06
  • its always failing..with 411 error..when a request is made,... – ananthan Jul 18 '12 at 05:21
  • is there a way to check whether chunk mode is enabled or not? – ananthan Jul 18 '12 at 05:22
  • let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/4151/discussion-between-ananthan-and-mgorven) – ananthan Jul 18 '12 at 07:09
  • Why do you use buggy unsupported version of nginx? Probably you will have better luck with the stable. – VBart Jul 18 '12 at 11:50
  • its the default nginx that comes with ubuntu 12.04. will ubuntu use this kind of unstable version with their package?.How can i verify it is stable or not. – ananthan Jul 18 '12 at 15:47
  • 1
    *will ubuntu use this kind of unstable version with their package?* They always do. *How can i verify it is stable or not.* By looking at [official nginx website](http://nginx.org/en/download.html) and [changelog](http://nginx.org/en/CHANGES-1.2). Note that a few critical bugs were fixed since (1.1.19) and also note that odd version numbers (0.9.x, 1.1.x, 1.3.x, etc...) are used for development releases. – VBart Jul 18 '12 at 21:22

1 Answers1

1

Solved after setting client_max_body_size in /etc/nginx.conf and restarting nginx

ananthan
  • 1,490
  • 1
  • 17
  • 27