Cannot Connect iOS devices

Nextcloud version: 27.0.2
Operating system and version: Ubuntu 22.04
Apache version: 2.4.52
PHP version: 8.1.2

This is the third time I’ve tried installing Nextcloud with the same result. I’ve followed the Nextcloud installation manual but I cannot get my Apple devices to connect and I don’t know why. When I try to login on the iOS app I get the message, Connection error A server with the specified hostname could not be found.

The time stamps of the latest logs in Admin > Logging do not match with the times that I attempt to login from the iOS app but I’ll include the latest one anyway.

[PHP] Error: dns_get_record(): A temporary server error occurred. at /var/www/nextcloud/lib/private/Http/Client/DnsPinMiddleware.php#84

GET /index.php/settings/ajax/checksetup
from *myIP* by user at 2023-09-04T18:11:39+00:00

I will note that this same log appears anywhere between two and six times every time I load up the webUI.

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => **REDACTED**,
  'passwordsalt' => **REDACTED**,
  'secret' => **REDACTED**,
  'trusted_domains' =>
  array (
    0 => 'nextcloud',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '27.0.2.1',
  'overwrite.cli.url' => 'http://nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'mypassword',
  'installed' => true,
);

The output of my /var/log/access.log has multiple outputs every minute so I just grabbed the last 2 minutes because it seems to repeat anyway:

IP.1.17 - - [04/Sep/2023:11:43:40 -0700] "GET /index.php/apps/logreader/po>
IP2.0.0.1 - - [04/Sep/2023:11:44:01 -0700] "GET /apps/richdocumentscode/proxy.p>
fe80::4c0f:aabd:35f6:3721%enp0s7 - nas [04/Sep/2023:11:44:02 -0700] "PROPFIND />
IP2.0.0.1 - - [04/Sep/2023:11:44:18 -0700] "GET /apps/richdocumentscode/proxy.p>
IP.1.17 - - [04/Sep/2023:11:44:18 -0700] "GET /ocs/v2.php/apps/notificatio>
IP.1.17 - - [04/Sep/2023:11:44:01 -0700] "GET /index.php/apps/logreader/po>
IP2.0.0.1 - - [04/Sep/2023:11:44:21 -0700] "GET /apps/richdocumentscode/proxy.p>
IP2.0.0.1 - - [04/Sep/2023:11:44:26 -0700] "GET /apps/richdocumentscode/proxy.p>
IP2.0.0.1 - - [04/Sep/2023:11:44:26 -0700] "GET /ocs/v2.php/apps/notifications/>
IP2.0.0.1 - - [04/Sep/2023:11:44:32 -0700] "GET /apps/richdocumentscode/proxy.p>
fe80::4c0f:aabd:35f6:3721%enp0s7 - nas [04/Sep/2023:11:44:32 -0700] "GET /ocs/v>
fe80::4c0f:aabd:35f6:3721%enp0s7 - nas [04/Sep/2023:11:44:32 -0700] "PROPFIND />
IP.1.17 - - [04/Sep/2023:11:44:21 -0700] "GET /index.php/apps/logreader/po>
IP2.0.0.1 - - [04/Sep/2023:11:44:41 -0700] "GET /apps/richdocumentscode/proxy.p>
IP2.0.0.1 - - [04/Sep/2023:11:44:56 -0700] "GET /apps/richdocumentscode/proxy.p>
IP2.0.0.1 - - [04/Sep/2023:11:44:56 -0700] "GET /ocs/v2.php/apps/notifications/>
IP.1.17 - - [04/Sep/2023:11:44:41 -0700] "GET /index.php/apps/logreader/po>
IP2.0.0.1 - - [04/Sep/2023:11:45:01 -0700] "GET /apps/richdocumentscode/proxy.p>
fe80::4c0f:aabd:35f6:3721%enp0s7 - nas [04/Sep/2023:11:45:02 -0700] "PROPFIND />

I couldn’t find the log supposedly located at var/www/nextcloud.log so if what I have provided proves insufficient please let me know and I’ll try to find what what you need to help me.
Thanks!

The smartphone couldn’t find the host. Is this a public domain or just a local one? Can you open the Nextcloud start page on the web browser?

Just a local one. No I cannot open the Nextcloud start page from the iOS web browser. It works perfectly fine on PC’s.

You are in the same network? What DNS server is the phone using vs. computers? With just the ip address, you can see the server (I think iOS has tools to ping network devices).

Same network, same DNS. This fact is what confuses me the most!

It was also suggested to me that perhaps this issue is due to the fact that my trusted domain is invalid. But it doesn’t make sense because that domain works when connecting from a PC on the same network.