I’ve been at this for a long time and all of my research only has SOME level of applicableness.
Anything in nextcloud between bruteforce logs, and sign in attempts, anything that SHOULD be a public IP address is only ::1, which is odd since I don’t utilize ipv6 in any capacity. I use Caddy v2 for the reverse proxy. The access logs in Caddy show the right IP addresses, both my celluar data’s IP and my home IP so that leads me to believe the issue is further down. Caddy and Nextcloud are hosted on the same server. Here’s what my CaddyFile looks like, I’ve had a LOT of revisions before and they all never worked but here it currently is:
nextcloud.com {
reverse_proxy localhost:8000
header {
Strict-Transport-Security max-age=31536000;
}
redir /.well-known/webfinger /public.php?service=webfinger 301
}
Here’s what it looks like in /etc/apache2/sites-enabled/nextcloud.conf
<VirtualHost *:8000>
DocumentRoot /var/www/html/nextcloud/
ServerName nextcloud.com
<Directory /var/www/html/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
</VirtualHost>
and here is my NextCloud configure file.
<?php
$CONFIG = array (
'instanceid' => 'XXXXXXXXXX',
'passwordsalt' => 'XXXXXXXXXXXXXXXXXXXXXXXX',
'secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'trusted_domains' =>
array (
0 => 'hostname',
1 => 'www.nextcloud.com',
2 => 'nextcloud.com',
),
'trusted_proxies' => array('127.0.0.1'),
'datadirectory' => '/RAID/nextcloud/data',
'dbtype' => 'mysql',
'version' => '21.0.9.1',
'overwritehost' => 'nextcloud.com',
'overwrite.cli.url' => 'http://nextcloud.com',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'XXXXXXX',
'dbpassword' => 'XXXXXXXXXXXXXXXXXXX',
'installed' => true,
'loglevel' => 0,
'updatechecker' => true,
'maintenance' => false,
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'XXXXXXXXXXXXXXX',
'mail_domain' => 'XXXXX',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'XXXXXXXXXXXXX',
'mail_smtpport' => '465',
'mail_smtpname' => 'XXXXXXXXXXXXXXXXXXXXXX',
'mail_smtppassword' => 'XXXXXXXXXXXXXXXXXXXXXXXXXX',
'has_rebuilt_cache' => true,
'updater.secret' => 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
'theme' => '',
);
Again, I’m not entirely sure what to troubleshoot anymore. Caddy gives me the right IP and I haven’t been able to figure out in any documentation anything but X-Forwarded-Host and I never get to see where or how to apply what that is. Any assistance would be greatly appreciated or at least any clues/websites that may lead me in the right direction. It all works fine otherwise.