Project

General

Profile

Support #639

Updated by Daniel Curtis over 8 years ago

This is a guide on increasing the upload size for PHP-FPM on an Nginx web server. 

 * First edit the php config file: 
 <pre> 
 vi /usr/local/etc/php.ini 
 </pre> 
 #* And change the following two parameters: 
 <pre> 
 upload_max_filesize = 100M 
 post_max_size = 100M 
 </pre> 

 * Then edit the nginx website config: 
 <pre> 
 vi /usr/local/etc/nginx/conf.d/www.example.com.conf 
 </pre> 
 #* And add the following to the server block: 
 <pre> 
 server { 
   client_max_body_size 100m; 
 } 
 </pre> 

 * *NOTE*: When I installed ownCloud the upload limit was overridden by a config file in the ownCloud path. To fix this I edited the config file in the ownCloud directory: 
 <pre> 
 vi /usr/local/www/owncloud/.user.ini 
 </pre> 
 #* And removed the *upload_max_filesize* and *post_max_size* values. 

 h2. Resources 

 * https://rtcamp.com/tutorials/php/increase-file-upload-size-limit/ 
 * http://php.net/manual/en/ini.core.php#ini.upload-max-filesize 
 * http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size 
 * https://doc.owncloud.org/server/8.0/admin_manual/installation/nginx_configuration.html

Back