Internal Server Error and no log

Software Info:

/usr/share/webapps/nextcloud/config # pacman -Qi nextcloud                                                           root@nas
Name            : nextcloud
Version         : 22.0.0-2
Description     : A cloud server to store your files centrally on a hardware controlled by you
Architecture    : any
URL             : https://nextcloud.com
Licenses        : AGPL3
Groups          : None
Provides        : None
Depends On      : php>=8.0.0  php<8.1.0  php-gd
Optional Deps   : curl: for webcron jobs from within uwsgi [installed]
                  ffmpeg: for preview generation [installed]
                  libreoffice: for preview generation
                  mariadb: to use a local MariaDB server [installed]
                  memcached: to use a local memcached server
                  php-apcu: for caching with APCU
                  php-apache: to use the Apache web server
                  mod_itk: to use the Apache web server
                  php-fpm: to run in fastCGI process manager [installed]
                  php-imagick: for preview generation
                  php-imap: for external user authentication
                  php-intl: to increase language translation performance and fix sorting
                  php-memcached: for caching with memcached
                  php-pgsql: to use the PostgreSQL database backend
                  php-redis: for caching with redis
                  php-sqlite: to use the SQLite database backend
                  postgresql: to use a local PostgreSQL server
                  redis: to use a local Redis server
                  smbclient: for SMB/CIFS integration
                  sudo: for privilege elevation in occ command when not run as root
                  uwsgi-plugin-php: run as application container
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 403.87 MiB
Packager        : David Runge <dvzrv@archlinux.org>
Build Date      : Sun 18 Jul 2021 05:54:40 AM CST
Install Date    : Tue 03 Aug 2021 09:01:52 PM CST
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature

config.php:

<?php
$CONFIG = array (
  'debug' => true,
  'datadirectory' => '/var/lib/nextcloud/data/',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/share/webapps/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/lib/nextcloud/apps',
      'url' => '/wapps',
      'writable' => true,
    ),
  ),
  'passwordsalt' => '*****',
  'secret' => '*****',
  'trusted_domains' => 
  array (
    0 => 'localhost',
  ),
  'dbtype' => 'mysql',
  'version' => '22.0.0.11',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '****',
);

When I deleted the log and restarted the server, I can’t find the log after I access my web, What can I do to fix the bug to access the log and normal use.

~ # wget https://localhost --no-check-certificate                                                                5 ↵ root@nas
--2021-08-03 22:21:47--  https://localhost/
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:443... connected.
WARNING: The certificate of ‘localhost’ is not trusted.
WARNING: The certificate of ‘localhost’ doesn't have a known issuer.
The certificate's owner does not match hostname ‘localhost’
HTTP request sent, awaiting response... 500 Internal Server Error
2021-08-03 22:21:47 ERROR 500: Internal Server Error.

------------------------------------------------------------------------------------------------------------------------------
~ # ls /var/log/nextcloud                                                                                        8 ↵ root@nas
------------------------------------------------------------------------------------------------------------------------------
~ # find / -name nextcloud.log                                                                                       root@nas
------------------------------------------------------------------------------------------------------------------------------
~ #