Nextcloud

From RVM Wiki
Revision as of 18:47, 18 January 2021 by Gabriele.vivinetto (talk | contribs)
Jump to navigation Jump to search

Abilitare login imap

cd /var/www/nextcloud
sudo -u www-data /usr/bin/php occ app:install user_external 
vi config/config.php
  'user_backends' =>
  array (
    0 =>
    array (
      'class' => 'OC_User_IMAP',
      'arguments' =>
      array (
        0 => 'assistenza.rvmgroup.it',
        1 => 993,
        2 => 'ssl',
        3 => '',
        4 => false,
        5 => false,
      ),
    ),
  ),

Abilitare cache minimale

vi config/config.php
'memcache.local' => '\OC\Memcache\APCu',

Abilitare well-known caldav e carddav

Se si installa in /nextcloud, occorre impostare questo


Your web server is not properly set up to resolve “/.well-known/caldav”. Further information can be found in the documentation 27.

Edit File: vi /etc/apache2/sites-enabled/default-ssl.conf

Add lines between </VirtualHost> and </IfModule>:

<Directory /var/www/nextcloud>
    AllowOverride All
</Directory>
Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav


vi /var/www/nextcloud/.htaccess

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{HTTP_USER_AGENT} DavClnt
  RewriteRule ^$ /remote.php/webdav/ [L,R=302]
  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteRule ^\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
  RewriteRule ^\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
  RewriteRule ^\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]
  RewriteRule ^\.well-known/nodeinfo /nextcloud/public.php?service=nodeinfo [QSA,L]
  RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]
  RewriteRule ^remote/(.*) /nextcloud/remote.php [QSA,L]
  RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
  RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

Riferimenti