From 7f01146c3d2534313ff35f71786e1e2eb752c31b Mon Sep 17 00:00:00 2001 From: jkaberg Date: Mon, 11 Aug 2014 23:51:24 +0200 Subject: [PATCH] enable large file uploads in nginx --- conf/nginx.conf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 041e751..5fcb632 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -26,13 +26,12 @@ server { ssl_certificate_key $SSL_KEY; include /etc/nginx/nginx-ssl.conf; - # Expose this directory as static files. # TODO: This is bad, we shouldnt hack it like this. root /usr/local/lib/owncloud;; index index.html index.htm; # ownCloud configuration - client_max_body_size 10G; # set max upload size + client_max_body_size 16G; # set max upload size fastcgi_buffers 64 4K; rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect; @@ -69,6 +68,11 @@ server { location ~ ^(.+?\.php)(/.*)?$ { try_files $1 = 404; + # PHP specific configuration to deal with large file uploads + fastcgi_param PHP_VALUE "upload_max_filesize = 16G"; + fastcgi_param PHP_VALUE "post_max_size = 16G"; + fastcgi_param PHP_VALUE "output_buffering = 16384"; + include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$1; fastcgi_param PATH_INFO $2;