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.3/apache2/php.ini:


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

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"    

Add this section just before </VirtualHost> 

Other message

I have chosen to ignore the message about the memory cache.

Previous pageNext page