enable large file uploads in nginx

This commit is contained in:
jkaberg 2014-08-11 23:51:24 +02:00
parent 54fe92615b
commit 7f01146c3d

View file

@ -26,13 +26,12 @@ server {
ssl_certificate_key $SSL_KEY; ssl_certificate_key $SSL_KEY;
include /etc/nginx/nginx-ssl.conf; include /etc/nginx/nginx-ssl.conf;
# Expose this directory as static files.
# TODO: This is bad, we shouldnt hack it like this. # TODO: This is bad, we shouldnt hack it like this.
root /usr/local/lib/owncloud;; root /usr/local/lib/owncloud;;
index index.html index.htm; index index.html index.htm;
# ownCloud configuration # ownCloud configuration
client_max_body_size 10G; # set max upload size client_max_body_size 16G; # set max upload size
fastcgi_buffers 64 4K; fastcgi_buffers 64 4K;
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect; rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
@ -69,6 +68,11 @@ server {
location ~ ^(.+?\.php)(/.*)?$ { location ~ ^(.+?\.php)(/.*)?$ {
try_files $1 = 404; 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; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$1; fastcgi_param SCRIPT_FILENAME $document_root$1;
fastcgi_param PATH_INFO $2; fastcgi_param PATH_INFO $2;