nextcloud 部署的一些要点

/usr/sbin/occ

#!/bin/sh

if [ $(id -u) -eq 0 ] || [ $(id -u) -eq 33 ];then
  OPT="$@"
  su www-data -s /bin/sh -c "/usr/bin/php /var/www/nextcloud/occ $OPT"
else
  echo "Please run as root"
fi

# crontab -u www-data -e

*/5 *   *   *   *   www-data /usr/bin/php -f /var/www/nextcloud/cron.php

/etc/apache2/conf-available/nextcloud.conf

Alias /nextcloud "/var/www/nextcloud/"

<IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"
</IfModule>

<Directory "/var/www/nextcloud">
    Options +FollowSymLinks
    AllowOverride All

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

    SetEnv HOME /var/www/nextcloud
    SetEnv HTTP_HOME /var/www/nextcloud


</Directory>

<Directory "/srv/ncdata/">
  Require all denied
</Directory>

nextcloudconfig

 'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0,
    'password' => '',
    'dbindex' => 0,
  ),

此处评论已关闭