Dear Nextcloud community,
I’m an amateur nextcloud admin and it’s my first time posting here, so please be kind if I am making silly mistakes.
For the first time, we’re using the nextcloud android app, which is losing connection to the server right after connecting. I figures this is to fail2ban blocking the client due to errors occuring in the apache error.log:
[Fri Jun 07 09:09:54.574952 2024] [auth_basic:error] [pid 2752407:tid 139968840197824] [remote <clientip>:57076] AH01618: user myuser@mydomain.org not found: /cloud/user
[Fri Jun 07 09:09:54.706795 2024] [auth_basic:error] [pid 2752407:tid 139968353662656] [client <clientip>:59311] AH01618: user myuser@mydomain.org not found: /dav/files/myuser@mydomain.org/
[Fri Jun 07 09:09:55.031464 2024] [auth_basic:error] [pid 2752407:tid 139968445884096] [client <clientip>:59311] AH01618: user myuser@mydomain.org not found: /cloud/capabilities
[Fri Jun 07 09:09:55.233168 2024] [auth_basic:error] [pid 2752407:tid 139968554989248] [client <clientip>:59311] AH01618: user myuser@mydomain.org not found: /avatar/myuser@mydomain.org/512
[Fri Jun 07 09:09:55.281202 2024] [auth_basic:error] [pid 2752406:tid 139968353564352] [client <clientip>:56471] AH01618: user myuser@mydomain.org not found: /apps/notifications/api/v2/push
[Fri Jun 07 09:09:55.288157 2024] [auth_basic:error] [pid 2752406:tid 139968655558336] [remote <clientip>:57086] AH01618: user myuser@mydomain.org not found: /cloud/user
[Fri Jun 07 09:09:55.420174 2024] [auth_basic:error] [pid 2752406:tid 139968647165632] [remote <clientip>:57086] AH01618: user myuser@mydomain.org not found: /cloud/user
[Fri Jun 07 09:09:55.421183 2024] [auth_basic:error] [pid 2752406:tid 139968496240320] [client <clientip>:56471] AH01618: user myuser@mydomain.org not found: /apps/notifications/api/v2/push
[Fri Jun 07 09:09:55.490221 2024] [auth_basic:error] [pid 2752406:tid 139968487847616] [client <clientip>:56471] AH01618: user myuser@mydomain.org not found: /apps/notifications/api/v2/push
while this behaviour wouldn’t disturb me right away, the errors are triggering fail2ban’s apache-auth module which is banning my client ip.
so instead of just working around that ban, I’m trying to get rid of those errors, but I’m stuck.
I’m using nextcloud 28.0.6 with the external user authenthication plugin, on Debian Bookworm, Apache 2.4.59, php8.3-fpm.
I have checked the apache nextcloud config (Installation on Linux — Nextcloud latest Administration Manual latest documentation). As I have nextcloud installed in a subdirectory DOMAIN FOR SALE, I have added the Satisfy Any
:
<Directory /var/www/mydomain.org/nextcloud>
Require all granted
Satisfy Any
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
and my config.php is, to my knowledge, quite normal:
config.php
<?php
$CONFIG = array (
'instanceid' => 'REDACTED',
'passwordsalt' => 'REDACTED',
'secret' => 'REDACTED',
'trusted_domains' =>
array (
0 => 'myfirstdomain.org',
1 => 'myseconddomain.org',
2 => 'mydomain.org',
),
'datadirectory' => '/var/www/myfirstdomain.org/nextcloud/data',
'overwrite.cli.url' => 'https://myfirstdomain.org/nextcloud',
'htaccess.RewriteBase' => '/nextcloud',
'dbtype' => 'mysql',
'version' => '28.0.6.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'REDACTED',
'dbpassword' => 'REDACTED',
'default_phone_region' => 'REDACTED',
'installed' => true,
'log_type' => 'file',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'logfilemode' => 416,
'loglevel' => 2,
'logdateformat' => 'F d, Y H:i:s',
'log_rotate_size' => 104857600,
'memcache.local' => '\\OC\\Memcache\\APCu',
'mail_from_address' => 'nextcloud',
'mail_smtpmode' => 'sendmail',
'mail_smtpauthtype' => 'LOGIN',
'mail_domain' => 'mydomain.org',
'maintenance' => false,
'theme' => '',
'user_backends' =>
array (
0 =>
array (
'class' => '\\OCA\\UserExternal\\IMAP',
'arguments' =>
array (
0 => '127.0.0.1',
1 => 143,
2 => NULL,
),
),
),
'mail_sendmailmode' => 'smtp',
'mysql.utf8mb4' => true,
'updater.release.channel' => 'stable',
);
?>
I have also regenerated .htaccess using occ maintenance:update:htaccess
.
There are no messages in the nextcloud.log when I’m starting the client and facing the issue.
Unfortunately, I could not find the slightest hint that anyone else is facing a similar problem, or how to solve it. Is there any Nextcloud magician who could help? Many thanks for your support and great work!
Best,
Teriberific