1

I have installed nginx,php-fpm,mysql from package manager on ubuntu 12.04,

Nginx version - 1.1.19.

How can we enable chunked uploading mode. Do we need to compile and install nginx for enabling Chunked Mode.

Will compiling nginx needs compilng php-fpm and mysql.

i am new to this can any one guide me.

For me with Apache chunked uploading is working without adding any extra modules.

is there a way to install missing modules in nginx using package manager like that of Apache.

ananthan
  • 1,490
  • 1
  • 17
  • 27

3 Answers3

4

In ubuntu 12.04, you need to install nginx-extras instead of nginx-full for this module

DanJ
  • 279
  • 1
  • 3
  • 12
3

According to Ubuntu's change log the chunkin module was added in 1.1.8 so 1.1.9 in 12.04 should have it. The nginx wiki explains the chunkin module in detail, but it works by replacing the 411 Length Required error page with a command that resumes the request:

chunkin on;

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

This should be set up in the server block.

If you are not getting the 411 Length Required error, then you have some other problem and should say exactly what error you are getting when you try to use chunked uploading.

As for the rest of your questions:

  • recompiling nginx does not require recompiling anything else
  • nginx must have all modules built in when it is compiled, so you cannot install modules with the package manager.
DerfK
  • 19,313
  • 2
  • 35
  • 51
  • Thank you for your suggestions.Thanks alot.I will post the error i am getting. – ananthan Jul 16 '12 at 14:40
  • As u said i put server { listen 80; chunkin on; error_page 411 = @my_411_error; location @my_411_error { chunkin_resume; } in /etc/nginx/sites-enabled-default/ but nginx -t is returning an error, showing unknown directive "chunkin" can u help me with this..please. – ananthan Jul 16 '12 at 14:58
  • @ananthan I checked the patch from the bug cited in the changelog here http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638814 and it definitely has support for `chunkin on`. Are you sure you are using the official nginx 1.1.19 package from Ubuntu 12.04 (Precise Pangolin)? – DerfK Jul 16 '12 at 15:37
  • yes i installed using apt-get command. chunkin on; is returning error :( showing "unknown directive". do i need to edit @my_411_error; and specify custom location.Can u help me.I am new to Nginx. – ananthan Jul 17 '12 at 04:21
  • I am getting 411 in the accesslog doesnt that indicate good sign,that it supports chunked uploading. – ananthan Jul 17 '12 at 04:57
0

Since nginx v1.3.9 was released in 2012 it has supported chunked mode request handling natively. It is no longer referred to as chunkin, nor requires explicit config to enable it.

Pierz
  • 553
  • 6
  • 9