Optimize Nextcloud

Log in as administrator to Nexcloud via the https URL.
Click on the icon of the logged in user and a drop down menu opens.
Select “Settings”.
This opens the Management menu. Click on “Overview” and you will see what can be optimized with respect to Nextcloud.


Configuration of PHP.

Customize file /etc/php/7.0/apache2/php.ini:

opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

Then: sudo service apache2 restart

/.well-known/caldav/ en /.well-known/carddav/

Copy file /var/www/html/nextcloud/.htaccess to /var/www/html

Modify the rules in the file by adding /nextcloud; like this:

RewriteRule ^\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]  RewriteRule ^\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]  
RewriteRule ^\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]  RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
RewriteRule ^\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]

Add the following configuration in file /etc/apache2/apache2.conf:

<Directory /var/www/html>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>

Message about  occ db:convert-filecache-bigint

  • cd /var/www/html/nextcloud
  • sudo -u www-data php occ db:convert-filecache-bigint

Strict-Transport-Security message

  • type commando: sudo a2enmod headers
  • Edit to file /etc/apache2/sites-available/www.mijndomein.nl-le-ssl.conf
<IfModule mod_headers.c>
      Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"    
</IfModule>

Add this section just before </VirtualHost> 

Other message

I have chosen to ignore the message about the memory cache.
The notification about the PHP version is currently not available on the Raspberry Pi (at the beginning of 2019).


Previous pageNext page