My setup is docker-compose with nextcloud, cron for nextcloud and mariadb containers. Also I’m using Traefik as my reverse-proxy on host machine.
Traefik labels on nextcloud container
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.rule=Host(`<some hostname>`)"
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
- "traefik.http.routers.nextcloud.entrypoints=websecure"
- "traefik.http.routers.nextcloud.tls.certresolver=myresolver"
- "traefik.http.routers.nextcloud.middlewares=compress@file,nextcloud-redirect@file"
- "traefik.http.routers.nextcloud.middlewares=servicests"
- "traefik.http.middlewares.servicests.headers.stsseconds=15552000"
where nextcloud-redirect
is a middleware for CardDav and CalDav redirection:
# traefik middlewares
nextcloud-redirect:
redirectRegex:
permanent: true
regex: "https://(.*)/.well-known/(card|cal)dav"
replacement: "https://${1}/remote.php/dav/"
Nextcloud version: Nextcloud Hub 5 (27.0.2)
Operating system and version: Debian GNU/Linux 12 (in nextcloud docker container)
Apache version: Apache/2.4.57 (in nextcloud docker container)
PHP version: 8.2.10 (in nextcloud docker container)
I can login with a browser and two of my Android 11 phones through the nextcloud app. But when I try to login through the nextcloud app on an android 12 tablet, the login screen doesn’t work for me - none of the buttons work. Pressing the login button does nothing.
Setting the log level to debug gives me an error:
[webdav] Debug: Sabre\DAV\Exception\NotAuthenticated: No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured at <<closure>>
0. /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
Sabre\DAV\Auth\Plugin->beforeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])
1. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 456
Sabre\DAV\Server->emit("beforeMethod:HEAD", [["Sabre\\HTTP\\ ... ]])
2. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253
Sabre\DAV\Server->invokeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])
3. /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321
Sabre\DAV\Server->start()
4. /var/www/html/apps/dav/lib/Server.php line 364
Sabre\DAV\Server->exec()
5. /var/www/html/apps/dav/appinfo/v2/remote.php line 35
OCA\DAV\Server->exec()
6. /var/www/html/remote.php line 172
require_once("/var/www/html/a ... p")
HEAD /remote.php/dav
from 31.173.81.250 at 2023-09-03T19:50:11+00:00
Also I have warning in the Administration overview about CardDav and CalDav. But my Traefik redirecting from /.well-known/caldav
to /remote.php/dav/
so by url I’m getting
This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.
I tried to change overwrite.cli.url
(issue) but it doesn’t help.
Can you please tell me what am I doing wrong?
The output of config.php file
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'passwordsalt' => 'some salt',
'secret' => 'some secret',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'my.host.name',
),
'trusted_proxies' =>
array (
0 => '172.26.0.2',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '27.0.2.1',
'overwrite.cli.url' => 'http://my.host.name',
'dbname' => 'nextcloud',
'dbhost' => 'mariadb',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'some user',
'dbpassword' => 'some password',
'installed' => true,
'instanceid' => 'some id',
'overwriteprotocol' => 'https',
'mail_from_address' => 'drive',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'host.name',
'theme' => '',
'loglevel' => 0,
'maintenance' => false,
'default_phone_region' => 'some region',
);