External access is so slow

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.3
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 8.2.16

The issue you are facing:

When accessing the Nextcloud running on Apache2 via the internal IP https://192.168.219.154, it redirects to https://192.168.219.164/index.php, and the site works correctly. However, when accessing through the external IP (blur) or the domain (blur), it continuously shows a white screen for almost 5 minutes before finally moving to the login screen. Considering that other sites running on this server have almost no loading time when accessed externally, it seems like the issue is specific to Nextcloud. Port forwarding has been completed, and for instance, when accessing a nonsensical URL like (blur)/djdse, the Nextcloud interface’s error screen appears fastly, which suggests that external access is indeed allowed.

I have also added 192.168.219.154, (blur), and (blur) to the trusted_domains in the config.php file. What could be the problem?

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

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


  GNU nano 6.2   /var/www/nextcloud/config/config.php            
<?php
$CONFIG = array (
'instanceid' => 'ocfqfxhzlhwu',
'datadirectory' => '/var/www/nextcloud/data',
'check_data_directory_permissions' => false,
'passwordsalt' => 'UIPLzRx7XD9BO8p6vZhfNBB16UPUyP',
'secret' => '1gdqToB2g77uXz22jynqJxiyAe0Bb9/34iJx2r6R04vCXKGy',
'trusted_domains' => 
array (
0 => '192.168.219.154',
1 => 'external ip’,
2 => 'domain',
),
'dbtype' => 'mysql',
'version' => '28.0.3.2',
'overwrite.cli.url' => 'https://domain',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'nextclouduser',
'dbpassword' => '123456',
'installed' => true,
'mail_from_address' => 'xxx',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'gmail.com',

The output of your Apache/nginx/system log in /var/log/____:


 deb apache2apache2-bin의 명령어 ' (2.4.52-1ubuntu4.6)'
  GNU nano 6.2                error.log                          
[Thu Mar 14 03:33:27.428515 2024] [mpm_prefork:notice] [pid 8351>
[Thu Mar 14 03:33:27.428587 2024] [core:notice] [pid 8351] AH000>
[Thu Mar 14 03:35:26.413562 2024] [mpm_prefork:notice] [pid 8351>
[Thu Mar 14 03:35:26.632363 2024] [mpm_prefork:notice] [pid 8408>
[Thu Mar 14 03:35:26.632430 2024] [core:notice] [pid 8408] AH000>
[Thu Mar 14 03:42:37.633676 2024] [mpm_prefork:notice] [pid 8408>
[Thu Mar 14 03:42:37.846530 2024] [mpm_prefork:notice] [pid 8602>
[Thu Mar 14 03:42:37.846609 2024] [core:notice] [pid 8602] AH000>
[Thu Mar 14 03:45:58.876749 2024] [php:error] [pid 8606] [client>
[Thu Mar 14 08:01:39.105814 2024] [mpm_prefork:notice] [pid 8602>
[Thu Mar 14 08:01:39.269794 2024] [mpm_prefork:notice] [pid 1272>
[Thu Mar 14 08:01:39.269876 2024] [core:notice] [pid 12724] AH00>
[Thu Mar 14 08:27:46.936632 2024] [php:error] [pid 12730] [clien>
[Thu Mar 14 08:27:49.394339 2024] [php:error] [pid 12729] [clien>
[Thu Mar 14 08:27:51.851885 2024] [php:error] [pid 12783] [clien>
[Thu Mar 14 08:27:52.466311 2024] [php:error] [pid 12726] [clien>
[Thu Mar 14 08:53:39.049459 2024] [mpm_prefork:notice] [pid 1272>
[Thu Mar 14 08:53:39.213908 2024] [mpm_prefork:notice] [pid 1368>
[Thu Mar 14 08:53:39.213976 2024] [core:notice] [pid 13680] AH00>
[Thu Mar 14 08:57:25.101664 2024] [mpm_prefork:notice] [pid 1368>
[Thu Mar 14 08:57:25.257472 2024] [mpm_prefork:notice] [pid 1387>
[Thu Mar 14 08:57:25.257548 2024] [core:notice] [pid 13877] AH00>
[Thu Mar 14 09:04:41.353286 2024] [mpm_prefork:notice] [pid 1387>
[Thu Mar 14 09:04:41.508849 2024] [mpm_prefork:notice] [pid 1433>
[Thu Mar 14 09:04:41.508913 2024] [core:notice] [pid 14330] AH00>
[Thu Mar 14 09:06:23.052983 2024] [mpm_prefork:notice] [pid 1433>
[Thu Mar 14 09:06:23.221159 2024] [mpm_prefork:notice] [pid 1443>
[Thu Mar 14 09:06:23.221226 2024] [core:notice] [pid 14439] AH00>


PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE