From afb09a84b7754937db90a3b4055c66548bba5b1a Mon Sep 17 00:00:00 2001 From: jkaberg Date: Tue, 12 Aug 2014 14:00:28 +0200 Subject: [PATCH] use tools/editconf.py to edit php.ini for large file uploads --- conf/nginx.conf | 6 ------ setup/owncloud.sh | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 20be9e2..411dfe8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -68,12 +68,6 @@ 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"; - fastcgi_param PHP_VALUE "memory_limit = 512M"; - include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$1; fastcgi_param PATH_INFO $2; diff --git a/setup/owncloud.sh b/setup/owncloud.sh index 9944544..e3c125c 100644 --- a/setup/owncloud.sh +++ b/setup/owncloud.sh @@ -58,6 +58,13 @@ fi mkdir -p $STORAGE_ROOT/owncloud chown -R www-data.www-data $STORAGE_ROOT/owncloud /usr/local/lib/owncloud +# Set PHP FPM values to support large file uploads +tools/editconf.py /etc/php5/fpm/php.ini \ + upload_max_filesize=16G \ + post_max_size=16G \ + output_buffering=16384 \ + memory_limit=512M + # Download and install the mail app # TODO: enable mail app in ownCloud config, not exposed afaik? if [ ! -d /usr/local/lib/owncloud/apps/mail ]; then