Nextcloud with Let´s Encrypt = SUPERSLOW

Discussion in 'ISPConfig 3 Priority Support' started by djesys, Jul 8, 2022.

  1. djesys

    djesys Member

    Hi there,
    I managed to install Nextcloud 24 using the settings below.
    Without Let´s encrypt it runs smoothly, with LE enabled unbearably slow, unusable.

    Screenshot 2022-07-08 at 22.43.43.png

    Screenshot 2022-07-08 at 22.44.07.png

    Nothing strange in Logs:

    Code:
    cat acme.log
    [Fri 08 Jul 2022 10:12:15 PM CEST] Lets find script dir.
    [Fri 08 Jul 2022 10:12:15 PM CEST] _SCRIPT_='/root/.acme.sh/acme.sh'
    [Fri 08 Jul 2022 10:12:15 PM CEST] _script='/root/.acme.sh/acme.sh'
    [Fri 08 Jul 2022 10:12:15 PM CEST] _script_home='/root/.acme.sh'
    [Fri 08 Jul 2022 10:12:15 PM CEST] Using default home:/root/.acme.sh
    [Fri 08 Jul 2022 10:12:15 PM CEST] Using config home:/root/.acme.sh
    [Fri 08 Jul 2022 10:12:15 PM CEST] Running cmd: installcert
    [Fri 08 Jul 2022 10:12:15 PM CEST] Using config home:/root/.acme.sh
    [Fri 08 Jul 2022 10:12:15 PM CEST] default_acme_server='https://acme-v02.api.letsencrypt.org/directory'
    [Fri 08 Jul 2022 10:12:15 PM CEST] ACME_DIRECTORY='https://acme-v02.api.letsencrypt.org/directory'
    [Fri 08 Jul 2022 10:12:15 PM CEST] DOMAIN_PATH='/root/.acme.sh/cloud.counter.party'
    [Fri 08 Jul 2022 10:12:15 PM CEST] Installing key to: /var/www/clients/client0/web1/ssl/cloud.counter.party-le.key
    [Fri 08 Jul 2022 10:12:15 PM CEST] Installing full chain to: /var/www/clients/client0/web1/ssl/cloud.counter.party-le.crt
    [Fri 08 Jul 2022 10:12:15 PM CEST] Run reload cmd: systemctl force-reload apache2.service
    [Fri 08 Jul 2022 10:12:15 PM CEST] Reload success
    [Fri 08 Jul 2022 10:38:01 PM CEST] Running cmd: issue
    [Fri 08 Jul 2022 10:38:01 PM CEST] _main_domain='cloud.counter.party'
    [Fri 08 Jul 2022 10:38:01 PM CEST] _alt_domains='no'
    [Fri 08 Jul 2022 10:38:01 PM CEST] Using config home:/root/.acme.sh
    [Fri 08 Jul 2022 10:38:01 PM CEST] default_acme_server='https://acme-v02.api.letsencrypt.org/directory'
    [Fri 08 Jul 2022 10:38:01 PM CEST] ACME_DIRECTORY='https://acme-v02.api.letsencrypt.org/directory'
    [Fri 08 Jul 2022 10:38:01 PM CEST] DOMAIN_PATH='/root/.acme.sh/cloud.counter.party'
    [Fri 08 Jul 2022 10:38:01 PM CEST] Le_NextRenewTime='1662408735'
    [Fri 08 Jul 2022 10:38:01 PM CEST] _saved_domain='cloud.counter.party'
    [Fri 08 Jul 2022 10:38:01 PM CEST] _saved_alt='no'
    [Fri 08 Jul 2022 10:38:01 PM CEST] _normized_saved_domains='cloud.counter.party,no,'
    [Fri 08 Jul 2022 10:38:01 PM CEST] _normized_domains='cloud.counter.party,no,'
    [Fri 08 Jul 2022 10:38:01 PM CEST] Domains not changed.
    [Fri 08 Jul 2022 10:38:01 PM CEST] Skip, Next renewal time is: 2022-09-06T20:12:15Z
    [Fri 08 Jul 2022 10:38:01 PM CEST] Add '--force' to force to renew.
    [Fri 08 Jul 2022 10:38:01 PM CEST] Lets find script dir.
    [Fri 08 Jul 2022 10:38:01 PM CEST] _SCRIPT_='/root/.acme.sh/acme.sh'
    [Fri 08 Jul 2022 10:38:01 PM CEST] _script='/root/.acme.sh/acme.sh'
    [Fri 08 Jul 2022 10:38:01 PM CEST] _script_home='/root/.acme.sh'
    [Fri 08 Jul 2022 10:38:01 PM CEST] Using default home:/root/.acme.sh
    [Fri 08 Jul 2022 10:38:01 PM CEST] Using config home:/root/.acme.sh
    [Fri 08 Jul 2022 10:38:02 PM CEST] Running cmd: installcert
    [Fri 08 Jul 2022 10:38:02 PM CEST] Using config home:/root/.acme.sh
    [Fri 08 Jul 2022 10:38:02 PM CEST] default_acme_server='https://acme-v02.api.letsencrypt.org/directory'
    [Fri 08 Jul 2022 10:38:02 PM CEST] ACME_DIRECTORY='https://acme-v02.api.letsencrypt.org/directory'
    [Fri 08 Jul 2022 10:38:02 PM CEST] DOMAIN_PATH='/root/.acme.sh/cloud.counter.party'
    [Fri 08 Jul 2022 10:38:02 PM CEST] Installing key to: /var/www/clients/client0/web1/ssl/cloud.counter.party-le.key
    [Fri 08 Jul 2022 10:38:02 PM CEST] Installing full chain to: /var/www/clients/client0/web1/ssl/cloud.counter.party-le.crt
    [Fri 08 Jul 2022 10:38:02 PM CEST] Run reload cmd: systemctl force-reload apache2.service
    [Fri 08 Jul 2022 10:38:02 PM CEST] Reload success
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    PHP and SSL are not related to each other, so I doubt that there is anything wrong with your PHP settings. Check Nextcloud settings if you have anywhere http:// instead of https:// in any of the config settings, check if you are doing any kind of http to https redirects in ISPConfig or elsewhere. Check website access.log and error.log to see if you get any errors or repeated access to files due to redirects.
     
  3. djesys

    djesys Member

    It got a lot better after adding the following as custom php.ini settings:

    Code:
    apc.enable_cli=1
    opcache.enable_cli=1
    opcache.memory_consumption=128
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=10000
    opcache.revalidate_freq=1
    opcache.save_comments=1
    memory_limit = 512M
    file_uploads = On
    allow_url_fopen = On
    upload_max_filesize = 500M
    post_max_size = 600M
    max_execution_time = 300
    display_errors = Off
    date.timezone = Europe/Amsterdam
    output_buffering = Off
    I also changed PHP to the recommended 8.0

    The missing part now is getting APCU working.
    I enabled it in php.ini, but nevertheless the following php code shows me, that it´s not running:

    Code:
    <?php
    echo "apcu loaded: " . extension_loaded("apcu") . "\n";
    echo "ini apc.enabled: " . ini_get("apc.enabled") . "\n";
    echo "ini apc.enable_cli: " . ini_get("apc.enable_cli") . "\n";
    echo "apc version (need min. 4.0.6): " . phpversion("apc") . "\n";
    echo "apcu version (need min. 5.1.0): " . phpversion("apcu") . "\n";
    
    Code:
     php checkapcu.php
    apcu loaded:
    ini apc.enabled:
    ini apc.enable_cli:
    apc version (need min. 4.0.6):
    apcu version (need min. 5.1.0):
    I also tried to add
    Code:
    'memcache.local' => '\\OC\Memcache\APCu',
    to the nexcloud config.php, but it yields an internal server error.

    Anybody knows how to activate memcache (apcu or redis) in nexcloud 24 ? thank you.
     

Share This Page