1.缓存
sudo apt install php-apcu memcached php-memcached
sudo systemctl restart apache2
添加以下内容到 config.php(一般在/var/www/nextcloud/config目录下)
'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Memcached',
'memcached_servers' => [
[ 'localhost', 11211 ],
],
再刷新网页
2.PHP 内存限制低于建议值 512MB。
修改/etc/php/7.4/apache2目录下的php.ini文件
将memory_limit = 128M修改为
memory_limit = 512M
修改后重启apache2
sudo systemctl restart apache2
3.HTTP的请求头 "Strict-Transport-Security" 未设置为至少 "15552000" 秒
修改/etc/apache2/sites-available目录下的default-ssl.conf
在VirtualHost节下面增加以下内容,xxx.xx.net为nextcloud设置的访问域名
ServerName xxx.xx.net
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
sudo systemctl restart apache2
4.您的网页服务器未正确设置以解析“/.well-known/caldav”
您的网页服务器未正确设置以解析“/.well-known/carddav”
修改/etc/apache2/sites-available目录下的nextcloud.conf,在这个文件 尾部加入以下内容
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
sudo systemctl restart apache2