Hello,
I’m rather new to Nextcloud so excuse my lack of knowledge.
I have Nextcloud running as a docker image and am using ngnix proxy manager to handle the https side of things.
That works great, but to increase security I’m trying to set up Fail2Ban (as a container) which is a bit problematic.
Everything is running and working (Fail2Ban bans me when it should,… mostly) but sadly Nextcloud is producing 404 errors looking like this in the npm-access log file:
404 404 - GET https <MYDOMAIN> "/index.php/.well-known/nodeinfo" [Client <MYIP>] [Length 36] [Gzip -] [Sent-to nextcloud-app] "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36" "-"
and other errors for
"/data/.ocdata?t=1683328590577"
"/index.php/.well-known/webfinger"
which leads to me getting banned as well.
The installation is new. (less than 10 days)
I don’t get any Warnings in the Overview apart from the Email and Phone region one.
The only mention of some of these addresses I found are in my ngnix proxy manager settings for Nextcloud.
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/webfinger {
return 301 $scheme://$host/index.php/.well-known/webfinger;
}
location /.well-known/nodeinfo {
return 301 $scheme://$host/index.php/.well-known/nodeinfo;
}
And now the suggested things…
The output of your Nextcloud log in Admin > Logging:
→ 2 failed login attempts
The output of your config.php file in /path/to/nextcloud
:
<?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,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'nextcloud-redis',
'password' => '-------------------',
'port' => 6379,
),
'overwritehost' => '--------------------',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://-----------------',
'passwordsalt' => '-----------------',
'secret' => '--------------------',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '---------------------',
2 => '---------------------',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '26.0.1.1',
'dbname' => 'nextcloud',
'dbhost' => 'nextcloud-db',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextcloud',
'dbpassword' => '-----------',
'installed' => true,
'instanceid' => '--------',
);
The output of your Apache/nginx/system log in /var/log/____
:
→ can’t read it, no vim/vi/nano on the container and copying didn’t help.
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors.
→ File doesn’t exist?
Help would be much appreciated.