#在sources.list上删除或注释原来的内容,加上以下内容 # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
# according to the documentation these two lines are not necessary, but version 21.0.0 will produce warnings in the overview setup check location = /.well-known/webfinger { return 301 /nextcloud/index.php$uri; } location = /.well-known/nodeinfo { return 301 /nextcloud/index.php$uri; }
# anything else is dynamically handled by Nextcloud location ^~ /.well-known { return 301 /nextcloud/index.php$uri; }
Cron Using the operating system cron feature is the preferred method for executing regular tasks. This method enables the execution of scheduled jobs without the inherent limitations the Web server might have.
To run a cron job on a *nix system, every 5 minutes, under the default Web server user (often, www-data or wwwrun), you must set up the following cron job to call the cron.php script: # crontab -u www-data -e
And append this line: */5 * * * * php -f /var/www/nextcloud/cron.php
You can verify if the cron job has been added and scheduled by executing: # crontab -u www-data -l
You have to replace the path /var/www/nextcloud/cron.php with the path to your current Nextcloud installation.
Note
On some systems it might be required to call php-cli instead of php.
Note
For some configurations, it might be neccessary to append --define apc.enable_cli=1 to the cron command. Please refer to Memory caching (section APCu).w/nextcloud/cron.php