Nextcloud/tmp
Prerequisite[Bearbeiten | Quelltext bearbeiten]
Install[Bearbeiten | Quelltext bearbeiten]
Download[Bearbeiten | Quelltext bearbeiten]
Download Nextcloud from https://nextcloud.com/install/#instructions-server and extract the archive in /var/www/nextcloud
.
Fix file permissions using
$ sudo chown -r www-data: /var/www/nextcloud/
Configure PHP[Bearbeiten | Quelltext bearbeiten]
Configure Webserver[Bearbeiten | Quelltext bearbeiten]
Configure Nextcloud[Bearbeiten | Quelltext bearbeiten]
//config.php
$ sudo tee "/usr/local/bin/occ" > /dev/null << EOF
> !/bin/sh
> sudo -u www-data /usr/bin/php /var/www/nextcloud/occ "\$@"
> EOF
$ sudo chmod +x /usr/local/bin/occ
Logs[Bearbeiten | Quelltext bearbeiten]
First you need to create a folder for the logs
$ sudo mkdir /var/log/nextcloud
$ sudo chmod 750 /var/log/nextcloud
$ sudo chown www-data:adm /var/log/nextcloud
Create file /etc/logrotate.d/nextcloud
with the following content
/var/log/nextcloud/nextcloud.log {
rotate 6
monthly
compress
delaycompress
missingok
notifempty
create 640 www-data adm
}
Finally activate the new log location. Edit /var/www/nextcloud/config/config.php
and add/edit the logfile
line
'logfile' => '/var/log/nextcloud/nextcloud.log',
Cron[Bearbeiten | Quelltext bearbeiten]
Create file /etc/cron.d/nextcloud
*/15 * * * * www-data /usr/bin/php -f /var/www/nextcloud/cron.php
Now open Nextcloud in your browser and go to the admin section and activate cron
Test[Bearbeiten | Quelltext bearbeiten]
Security[Bearbeiten | Quelltext bearbeiten]
Nextcloud is providing a security scanning service for public instances. Scan your instance to find configuration issues.