Nextcloud/tmp: Unterschied zwischen den Versionen

Aus Foxwiki
Die Seite wurde neu angelegt: „= Prerequisite = * Nginx * PHP * MariaDB == Install == === Download === Download Nextcloud from https://nextcloud.com/install/#instructions-server and extract the archive in <code>/var/www/nextcloud</code>. Fix file permissions using<syntaxhighlight lang="console"> $ sudo chown -r www-data: /var/www/nextcloud/ </syntaxhighlight> === Configure PHP === {{PHP/open_basedir|folders=/var/www/nextcloud/:/dev/:/var/log/nextcloud/}} === Configure…“
 
Keine Bearbeitungszusammenfassung
 
Zeile 144: Zeile 144:
=== Security ===
=== Security ===
Nextcloud is providing a [https://scan.nextcloud.com/ security scanning service] for public instances.  Scan your instance to find configuration issues.
Nextcloud is providing a [https://scan.nextcloud.com/ security scanning service] for public instances.  Scan your instance to find configuration issues.
#  https://wiki.meurisse.org/wiki/Nextcloud

Aktuelle Version vom 14. Juni 2023, 17:01 Uhr

Prerequisite

Install

Download

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

Vorlage:PHP/open basedir

Configure Webserver

Vorlage:Nginx/New Site

Configure Nextcloud

//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

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

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

Datei:Owncloud cron.png

Test

Security

Nextcloud is providing a security scanning service for public instances. Scan your instance to find configuration issues.

  1. https://wiki.meurisse.org/wiki/Nextcloud