darktrinity
Goto Top

Nextcloud 18.04: Kein Webdav, Caldav, Cardav

Hallo liebe Community,

ich bin verzweifelt face-sad

Seit Tagen kämpfe ich mit Nextcloud, was ich auf einer lokalen VM installiert habe. Ich kann aber leider nur die UI im Browser nutzen - Kein Webdav/Caldav/Cardav...

Der Testserver (Gast System):
  • Ubuntu 18.04 Server mit ISP Config
  • mehere Domains, u.a. die "nextcloud.test22.local"
  • Das VM System ist VirtualBox

Das Wirt System:
  • Hier sind der Einfachheit halber alle Domains des Testservers in der hosts - Datei eingebunden
  • OpenSuse Leap

Das Problem:
Kein Zugriff auf Webdav/Caldav/Cardav
  • Webdav: vergeblich mit Dolphin getestet, Zugriff wird verweigert
  • Caldav & Cardav: vergeblich mit Thunderbird getestet. Es erscheint immer wieder das Abfragefenster zu Benutzername&Passwort. Wenn ich die richtigen Daten eingegeben habe, erscheint es wieder und fragt ab. So geht das endlos weiter
  • Auch getestet: Der Nextcloud Desktop Client. Hier erscheint der LogIn Bereich. Dieser wird zur schwarzen Box wenn ich ihn anclicke. Einmal habe ich es so weit geschafft, daß ich Username+Passwort eintragen konnte. Das resultierte in einem endlosen Ladevorgang

Webserver Config (Apache)
  • Hier habe ich die PHP Modi Fast CGI sowie PHP-FPM getestet. Funktionierte beides gleich schlecht (siehe oben)
  • PHP Version 7.2

Die Host Datei wurde durch ISP Config automatisch erstellt und durch eigene Direktiven, entsprechend der Doku von Nextcloud, in der ISP Config UI ergänzt (das sind die am Schluss der Datei):
cat nextcloud.test22.local.vhost
<Directory /var/www/nextcloud.test22.local>
                AllowOverride None
                                Require all denied
                </Directory>

<VirtualHost *:80>

                                        DocumentRoot /var/www/clients/client4/web5/web

                ServerName nextcloud.test22.local
                ServerAdmin webmaster@nextcloud.test22.local


                ErrorLog /var/log/ispconfig/httpd/nextcloud.test22.local/error.log


                <IfModule mod_ssl.c>
                </IfModule>

                <Directory /var/www/nextcloud.test22.local/web>
                                # Clear PHP settings of this website
                                <FilesMatch ".+\.ph(p[345]?|t|tml)$">  
                                                SetHandler None
                                </FilesMatch>
                                Options +SymlinksIfOwnerMatch
                                AllowOverride All
                                                                Require all granted

                                # ssi enabled
                                AddType text/html .shtml
                                AddOutputFilter INCLUDES .shtml
                                Options +Includes
                </Directory>
                <Directory /var/www/clients/client4/web5/web>
                                # Clear PHP settings of this website
                                <FilesMatch ".+\.ph(p[345]?|t|tml)$">  
                                                SetHandler None
                                </FilesMatch>
                                Options +SymlinksIfOwnerMatch
                                AllowOverride All
                                                                Require all granted

                                # ssi enabled
                                AddType text/html .shtml
                                AddOutputFilter INCLUDES .shtml
                                Options +Includes
                </Directory>

                <IfModule mod_ruby.c>
                        <Directory /var/www/nextcloud.test22.local/web>
                                Options +ExecCGI
                        </Directory>
                        RubyRequire apache/ruby-run
                        #RubySafeLevel 0
                        AddType text/html .rb
                        AddType text/html .rbx
                        <Files *.rb>
                                SetHandler ruby-object
                                RubyHandler Apache::RubyRun.instance
                        </Files>
                        <Files *.rbx>
                                SetHandler ruby-object
                                RubyHandler Apache::RubyRun.instance
                        </Files>
                </IfModule>

                <IfModule mod_perl.c>
                        PerlModule ModPerl::Registry
                        PerlModule Apache2::Reload
                        <Directory /var/www/nextcloud.test22.local/web>
                                PerlResponseHandler ModPerl::Registry
                                PerlOptions +ParseHeaders
                                Options +ExecCGI
                        </Directory>
                        <Directory /var/www/clients/client4/web5/web>
                                PerlResponseHandler ModPerl::Registry
                                PerlOptions +ParseHeaders
                                Options +ExecCGI
                        </Directory>
            <Files *.pl>
                                SetHandler perl-script
            </Files>
                </IfModule>

                <IfModule mod_python.c>
                        <Directory /var/www/nextcloud.test22.local/web>
                                <FilesMatch "\.py$">  
                                        SetHandler mod_python
                                </FilesMatch>
                                PythonHandler mod_python.publisher
                                PythonDebug On
                        </Directory>
                        <Directory /var/www/clients/client4/web5/web>
                                <FilesMatch "\.py$">  
                                        SetHandler mod_python
                                </FilesMatch>
                                PythonHandler mod_python.publisher
                                PythonDebug On
                        </Directory>
                </IfModule>

                # cgi enabled
        <Directory /var/www/clients/client4/web5/cgi-bin>
                        AllowOverride All
                                                Require all granted
                                        </Directory>
                ScriptAlias  /cgi-bin/ /var/www/clients/client4/web5/cgi-bin/
                <FilesMatch "\.(cgi|pl)$">  
                        SetHandler cgi-script
                </FilesMatch>
                # suexec enabled
                <IfModule mod_suexec.c>
                        SuexecUserGroup web5 client4
                </IfModule>
                <IfModule mod_fastcgi.c>
                                <Directory /var/www/clients/client4/web5/cgi-bin>
                                                                                Require all granted
                                                                    </Directory>
                                <Directory /var/www/nextcloud.test22.local/web>
                                        <FilesMatch "\.php[345]?$">  
                                                SetHandler php-fcgi
                                        </FilesMatch>
                                </Directory>
                                <Directory /var/www/clients/client4/web5/web>
                                        <FilesMatch "\.php[345]?$">  
                                                SetHandler php-fcgi
                                        </FilesMatch>
                                </Directory>
                Action php-fcgi /php-fcgi virtual
                                Alias /php-fcgi /var/www/clients/client4/web5/cgi-bin/php-fcgi-*-80-nextcloud.test22.local
                FastCgiExternalServer /var/www/clients/client4/web5/cgi-bin/php-fcgi-*-80-nextcloud.test22.local -idle-timeout 300 -socket /var/lib/php7.2-fpm/web5.sock -pass-header Authorization  -pass-header Content-Type
                </IfModule>
                <IfModule mod_proxy_fcgi.c>
                        #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php7.2-fpm/web5.sock|fcgi://localhost//var/www/clients/client4/web5/web/$1
                        <Directory /var/www/clients/client4/web5/web>
                                <FilesMatch "\.php[345]?$">  
                                                SetHandler "proxy:unix:/var/lib/php7.2-fpm/web5.sock|fcgi://localhost"  
                                </FilesMatch>
                        </Directory>
                        </IfModule>



                # add support for apache mpm_itk
                <IfModule mpm_itk_module>
                        AssignUserId web5 client4
                </IfModule>

                <IfModule mod_dav_fs.c>
                # Do not execute PHP files in webdav directory
                        <Directory /var/www/clients/client4/web5/webdav>
                                <ifModule mod_security2.c>
                                        SecRuleRemoveById 960015
                                        SecRuleRemoveById 960032
                                </ifModule>
                                <FilesMatch "\.ph(p3?|tml)$">  
                                        SetHandler None
                                </FilesMatch>
                        </Directory>
                        DavLockDB /var/www/clients/client4/web5/tmp/DavLock
                        # DO NOT REMOVE THE COMMENTS!
                        # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
                        # WEBDAV END
                </IfModule>

                        <Directory /var/www/nextcloud.test22.local/web>
 
 Require all granted
  AllowOverride All
  Options FollowSymLinks MultiViews

  <IfModule mod_dav.c>
    Dav off
  </IfModule>
Satisfy Any
</Directory>




</VirtualHost>


<VirtualHost *:443>

                                        DocumentRoot /var/www/clients/client4/web5/web

                ServerName nextcloud.test22.local
                ServerAdmin webmaster@nextcloud.test22.local


                ErrorLog /var/log/ispconfig/httpd/nextcloud.test22.local/error.log


                <IfModule mod_ssl.c>
                SSLEngine on
                SSLProtocol All -SSLv2 -SSLv3
                # SSLCipherSuite          ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
                SSLHonorCipherOrder     on
                # <IfModule mod_headers.c>
                # Header always add Strict-Transport-Security "max-age=15768000"  
                # </IfModule>
                SSLCertificateFile /var/www/clients/client4/web5/ssl/nextcloud.test22.local.crt
                SSLCertificateKeyFile /var/www/clients/client4/web5/ssl/nextcloud.test22.local.key
                                SSLUseStapling on
                SSLStaplingResponderTimeout 5
                SSLStaplingReturnResponderErrors off
                                </IfModule>

                <Directory /var/www/nextcloud.test22.local/web>
                                # Clear PHP settings of this website
                                <FilesMatch ".+\.ph(p[345]?|t|tml)$">  
                                                SetHandler None
                                </FilesMatch>
                                Options +SymlinksIfOwnerMatch
                                AllowOverride All
                                                                Require all granted

                                # ssi enabled
                                AddType text/html .shtml
                                AddOutputFilter INCLUDES .shtml
                                Options +Includes
                </Directory>
                <Directory /var/www/clients/client4/web5/web>
                                # Clear PHP settings of this website
                                <FilesMatch ".+\.ph(p[345]?|t|tml)$">  
                                                SetHandler None
                                </FilesMatch>
                                Options +SymlinksIfOwnerMatch
                                AllowOverride All
                                                                Require all granted

                                # ssi enabled
                                AddType text/html .shtml
                                AddOutputFilter INCLUDES .shtml
                                Options +Includes
                </Directory>

                <IfModule mod_ruby.c>
                        <Directory /var/www/nextcloud.test22.local/web>
                                Options +ExecCGI
                        </Directory>
                        RubyRequire apache/ruby-run
                        #RubySafeLevel 0
                        AddType text/html .rb
                        AddType text/html .rbx
                        <Files *.rb>
                                SetHandler ruby-object
                                RubyHandler Apache::RubyRun.instance
                        </Files>
                        <Files *.rbx>
                                SetHandler ruby-object
                                RubyHandler Apache::RubyRun.instance
                        </Files>
                </IfModule>

                <IfModule mod_perl.c>
                        PerlModule ModPerl::Registry
                        PerlModule Apache2::Reload
                        <Directory /var/www/nextcloud.test22.local/web>
                                PerlResponseHandler ModPerl::Registry
                                PerlOptions +ParseHeaders
                                Options +ExecCGI
                        </Directory>
                        <Directory /var/www/clients/client4/web5/web>
                                PerlResponseHandler ModPerl::Registry
                                PerlOptions +ParseHeaders
                                Options +ExecCGI
                        </Directory>
            <Files *.pl>
                                SetHandler perl-script
            </Files>
                </IfModule>

                <IfModule mod_python.c>
                        <Directory /var/www/nextcloud.test22.local/web>
                                <FilesMatch "\.py$">  
                                        SetHandler mod_python
                                </FilesMatch>
                                PythonHandler mod_python.publisher
                                PythonDebug On
                        </Directory>
                        <Directory /var/www/clients/client4/web5/web>
                                <FilesMatch "\.py$">  
                                        SetHandler mod_python
                                </FilesMatch>
                                PythonHandler mod_python.publisher
                                PythonDebug On
                        </Directory>
                </IfModule>

                # cgi enabled
        <Directory /var/www/clients/client4/web5/cgi-bin>
                        AllowOverride All
                                                Require all granted
                                        </Directory>
                ScriptAlias  /cgi-bin/ /var/www/clients/client4/web5/cgi-bin/
                <FilesMatch "\.(cgi|pl)$">  
                        SetHandler cgi-script
                </FilesMatch>
                # suexec enabled
                <IfModule mod_suexec.c>
                        SuexecUserGroup web5 client4
                </IfModule>
                <IfModule mod_fastcgi.c>
                                <Directory /var/www/clients/client4/web5/cgi-bin>
                                                                                Require all granted
                                                                    </Directory>
                                <Directory /var/www/nextcloud.test22.local/web>
                                        <FilesMatch "\.php[345]?$">  
                                                SetHandler php-fcgi
                                        </FilesMatch>
                                </Directory>
                                <Directory /var/www/clients/client4/web5/web>
                                        <FilesMatch "\.php[345]?$">  
                                                SetHandler php-fcgi
                                        </FilesMatch>
                                </Directory>
                Action php-fcgi /php-fcgi virtual
                                Alias /php-fcgi /var/www/clients/client4/web5/cgi-bin/php-fcgi-*-443-nextcloud.test22.local
                FastCgiExternalServer /var/www/clients/client4/web5/cgi-bin/php-fcgi-*-443-nextcloud.test22.local -idle-timeout 300 -socket /var/lib/php7.2-fpm/web5.sock -pass-header Authorization  -pass-header Content-Type
                </IfModule>
                <IfModule mod_proxy_fcgi.c>
                        #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php7.2-fpm/web5.sock|fcgi://localhost//var/www/clients/client4/web5/web/$1
                        <Directory /var/www/clients/client4/web5/web>
                                <FilesMatch "\.php[345]?$">  
                                                SetHandler "proxy:unix:/var/lib/php7.2-fpm/web5.sock|fcgi://localhost"  
                                </FilesMatch>
                        </Directory>
                        </IfModule>



                # add support for apache mpm_itk
                <IfModule mpm_itk_module>
                        AssignUserId web5 client4
                </IfModule>

                <IfModule mod_dav_fs.c>
                # Do not execute PHP files in webdav directory
                        <Directory /var/www/clients/client4/web5/webdav>
                                <ifModule mod_security2.c>
                                        SecRuleRemoveById 960015
                                        SecRuleRemoveById 960032
                                </ifModule>
                                <FilesMatch "\.ph(p3?|tml)$">  
                                        SetHandler None
                                </FilesMatch>
                        </Directory>
                        DavLockDB /var/www/clients/client4/web5/tmp/DavLock
                        # DO NOT REMOVE THE COMMENTS!
                        # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
                        # WEBDAV END
                </IfModule>

        <Directory /var/www/nextcloud.test22.local/web>
 
 Require all granted
  AllowOverride All
  Options FollowSymLinks MultiViews

  <IfModule mod_dav.c>
    Dav off
  </IfModule>
Satisfy Any
</Directory>




</VirtualHost>

<IfModule mod_ssl.c>
        SSLStaplingCache shmcb:/var/run/ocsp(128000)
</IfModule>


PHP Einstellungen
file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 100M
display_errors = Off
date.timezone = Europe/Berlin

PHP Module:
php -m
[PHP Modules]
apc
apcu
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imagick
imap
intl
json
ldap
libxml
mbstring
memcache
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
readline
recode
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Apache Module:
apache2ctl -M
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:73
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message  
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 auth_digest_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dav_module (shared)
 dav_fs_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 fcgid_module (shared)
 filter_module (shared)
 headers_module (shared)
 include_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 proxy_module (shared)
 proxy_fcgi_module (shared)
 python_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)
 suexec_module (shared)

Das Nextcloud Log Level steht auf 2. Komischerweise finde ich in den Logs aber zB keinerlei Einträge zu den fehlgeschlagenen LogIns durch Thunderbird. Hier ein Auszug:
{"reqId":"8tyKe1YTsuVaS0Xf5bAc","level":2,"time":"2020-05-23T12:38:02+00:00","remoteAddr":"192.168.0.2","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/adminzugang/","message":"Login failed: 'admin' (Remote IP: '192.168.0.2')","userAgent":"Mozilla/5.0 (X11; Linux x86_64) KHTML/5.55.0 (like Gecko) Konqueror/5 KIO/5.55","version":"18.0.4.2"}  
{"reqId":"y3PpMYC5QNMAY0NFbSUw","level":2,"time":"2020-05-23T12:39:27+00:00","remoteAddr":"192.168.0.2","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/adminzugang/","message":"Login failed: 'admin' (Remote IP: '192.168.0.2')","userAgent":"Mozilla/5.0 (X11; Linux x86_64) KHTML/5.55.0 (like Gecko) Konqueror/5 KIO/5.55","version":"18.0.4.2"}  
{"reqId":"YPIYypmrnf3X3lt2va9H","level":2,"time":"2020-05-23T12:39:53+00:00","remoteAddr":"192.168.0.2","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/adminzugang/","message":"Login failed: 'adminzugang' (Remote IP: '192.168.0.2')","userAgent":"Mozilla/5.0 (X11; Linux x86_64) KHTML/5.55.0 (like Gecko) Konqueror/5 KIO/5.55","version":"18.0.4.2"}  
{"reqId":"TPq8rfd0XbhNmBTrRcyy","level":2,"time":"2020-05-23T12:40:03+00:00","remoteAddr":"192.168.0.2","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/adminzugang/","message":"Login failed: 'admin' (Remote IP: '192.168.0.2')","userAgent":"Mozilla/5.0 (X11; Linux x86_64) KHTML/5.55.0 (like Gecko) Konqueror/5 KIO/5.55","version":"18.0.4.2"}  

Content-Key: 574176

Url: https://administrator.de/contentid/574176

Ausgedruckt am: 29.03.2024 um 12:03 Uhr

Mitglied: aqui
aqui 23.05.2020 aktualisiert um 16:53:27 Uhr
Goto Top
mehere Domains, u.a. die "nextcloud.test22.local"
Was eine sehr schlechte und nicht besonders intelligente Wahl ist ! Die Root Domain .local ist absolut Tabu und sollte niemals benutzt werden, denn sie ist weltweit dem mDNS Dienst vorbehalten durch die IANA.
https://de.wikipedia.org/wiki/Zeroconf#Multicast_DNS
bzw.
https://tools.ietf.org/html/rfc2606
Das es damit über kurz oder lang zu Fehlern und Konflikten im Netz kommt liegt dann auf der Hand. Öffentlich funktioniert diese Root Domain niemals und wäre ein noch größeres NoGo !
Welche Root Domains sinnvoll zu verwenden sind erklärt dir dieser ct' Artikel:
https://www.heise.de/select/ct/2017/26/1513540412603853
Lesen und verstehen hilft hier also wirklich !

P.S.:
In einer simplen Nextcloud Standard Installation gemäß:
https://bayton.org/docs/nextcloud/installing-nextcloud-on-ubuntu-16-04-l ...
funktiuonierte der Card-, CalDAV sowie der WebDAV Zugang ohne jegliche Probleme oder Zutun Out of the Box auf einem Ubuntu 18.04 in einer ESXi 6.7 VM.
Natürlich mit korrekter Root Domain und entsprechendem Regelwerk der Firewall.
Mitglied: DarkTrinity
DarkTrinity 23.05.2020 um 16:53:15 Uhr
Goto Top
Die anderen Domains funktionieren aber seltsamerweise als .local (inklusive webdav, caldav und cardav). Ich denke nicht daß es an der .local Domain liegt.
Mitglied: aqui
aqui 23.05.2020 um 16:54:58 Uhr
Goto Top
War auch nur ein kleiner und bescheidener Hinweis auf die falsche und nicht Standard konforme Verwendung dieser Root Domain. Auf einem öffentlichen Server immer ein klares NoGo !
Mitglied: DarkTrinity
DarkTrinity 23.05.2020 um 16:58:12 Uhr
Goto Top
Es ist wie gesagt eine VM, die nicht öffentlich erreichbar ist. Es ist mehr ein Entwicklersystem zum coden