2

I am struggling to get Nextcloud to accept larger files (up to 512MB) via SSL.

What I have this far is:

In /etc/apache2/conf-enabled/owncloud.conf:

Alias /nextcloud "/var/www/nextcloud/"
<Directory "/var/www/nextcloud">
  Options +FollowSymLinks
  AllowOverride All

  <IfModule mod_dav.c>
        Dav off
  </IfModule>
  LimitRequestBody 201048600
  SSLRenegBufferSize 201048600
  SetEnv HOME /var/www/nextcloud
  SetEnv HTTP_HOME /var/www/nextcloud
</Directory>

<Directory "/var/www/nextcloud/data/">
  # just in case if .htaccess gets disabled
    Require all denied
</Directory>

In /etc/php5/apache2/php.ini (confirmed by phpinfo() and set in nextcloud admin settings, too)

post_max_size = 512M
upload_max_filesize = 512M

However, larger files can still not be uploaded (413 Request Entity Too Large). It doesn't even work with 6 MB files...

Am I missing some kind of special setting?

Mathias Conradt
  • 28,420
  • 21
  • 138
  • 192
Zahlii
  • 818
  • 1
  • 7
  • 17

1 Answers1

4

I forgot that the test-server running nextcloud was only accessible via an nginx proxy server. I had to add client_max_body_size 512M in the nginx config as well.

Zahlii
  • 818
  • 1
  • 7
  • 17
  • Did you check the **.htaccess** hidden file in the Nextcloud installation root folder? It can override your **php.ini** and **.conf** settings, as I can see in my installation: ``` php_value upload_max_filesize 511M php_value post_max_size 511M php_value memory_limit 512M [...] ``` ``` php_value upload_max_filesize 511M php_value post_max_size 511M php_value memory_limit 512M [...] ``` – Seavel Feb 12 '19 at 17:10