Internal server error after installation, anybody knows what's wrong with this?

openwrt, thus only one root user, all of my apps were running with root, webroot files are owned by root either.

itā€™s a local installation, IP only.

the htaccesstest.txt file was generated by nextcloud itself.

I think this could be problematic. Do you have a user for the webserver? Because normally the file-owner is the webserver-user.

In debian for example www-data?

my webserver-user is root, both nginx and php-fpm are running on the basis of root. thus files created by php are also root-owned.

Please post config/config.php

<?php
$CONFIG = array (
  'instanceid' => 'oczupo70rk8y',
  'passwordsalt' => 'ZMN5Jtpf0Hxb3MkYyuvHOPKM9RCiCV',
  'secret' => 'SbmntcWRnZ6PTjKY7WjuR4ErlRP2PD4ab5hIoRinXs+IAcVB',
  'trusted_domains' => 
  array (
    0 => '192.168.31.1:83',
  ),
  'datadirectory' => '/opt/wwwroot/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '19.0.0.12',
  'overwrite.cli.url' => 'http://192.168.31.1:83',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'oc_test3',
  'dbpassword' => 'Nz8Nmy19nM7q5aFcUrDRfjdxiw+lg1',
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
    'host' => '/opt/var/run/redis.sock',
    'port' => 0,
    ),
);

I do not know if this is correct with ip and port. Sorry

  'overwrite.cli.url' => 'http://192.168.31.1:83',

Perhapsy ou must change it to a value without port.

thanks, iā€™ll have a try

nothing changed

Please check if there is a .htaccess:

ls -l /opt/webroot/nextcloud/.htaccess

And why is there an entry htaccesstest.txt? That makes no sense.
Please post the content of the htaccesstest.txt (the first lines).
Please also look in other directorys and search .htaccess and htaccesstest.txt

yes, there is a .htaccess file under /data

Also under / in the nextcloud folder?

yes, isā€™n it was included by nextcloud by default?

Please check your .htaccess / rewrite rules and configuration on nginx.

The .htaccess files are used from the webserver (nginx/apache2) for mod-rewrite. Perhaps it does not work. Check if ngix is correct configured for using nextcloud. Sorry i only use apache2 and not nginx.

these tables are strange, most of them are empty, does it mean the installation actually failed?

Only one ERROR log, but I cannot figure out whatā€™s the point.

{
    "reqId": "xnlCLdNOh23VnDhvjPQF",
    "level": 3,
    "time": "2020-07-09T16:48:36+00:00",
    "remoteAddr": "192.168.31.22",
    "user": "--",
    "app": "index",
    "method": "POST",
    "url": "/index.php",
    "message":
    {
        "Exception": "Error",
        "Message": "Call to undefined function OC\\Files\\Storage\\filter_var()",
        "Code": 0,
        "Trace": [
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/Storage/Common.php",
            "line": 558,
            "function": "scanForInvalidCharacters",
            "class": "OC\\Files\\Storage\\Common",
            "type": "->",
            "args": ["*** sensitive parameter replaced ***", "\\/"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/Storage/Common.php",
            "line": 549,
            "function": "verifyPosixPath",
            "class": "OC\\Files\\Storage\\Common",
            "type": "->",
            "args": ["*** sensitive parameter replaced ***"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/Cache/Scanner.php",
            "line": 136,
            "function": "verifyPath",
            "class": "OC\\Files\\Storage\\Common",
            "type": "->",
            "args": [".", "*** sensitive parameter replaced ***"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/Cache/Scanner.php",
            "line": 338,
            "function": "scanFile",
            "class": "OC\\Files\\Cache\\Scanner",
            "type": "->",
            "args": ["*** sensitive parameter replaced ***", 3, -1, null, false]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/Cache/Updater.php",
            "line": 125,
            "function": "scan",
            "class": "OC\\Files\\Cache\\Scanner",
            "type": "->",
            "args": ["*** sensitive parameter replaced ***", false, 3, false]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/View.php",
            "line": 323,
            "function": "update",
            "class": "OC\\Files\\Cache\\Updater",
            "type": "->",
            "args": ["*** sensitive parameters replaced ***"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/View.php",
            "line": 1176,
            "function": "writeUpdate",
            "class": "OC\\Files\\View",
            "type": "->",
            "args": [
            {
                "__class__": "OC\\Files\\Storage\\Local"
            }, "*** sensitive parameter replaced ***"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/View.php",
            "line": 271,
            "function": "basicOperation",
            "class": "OC\\Files\\View",
            "type": "->",
            "args": ["mkdir", "/appdata_ocsg5zv5spo7", ["create", "write"]]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/Node/Folder.php",
            "line": 164,
            "function": "mkdir",
            "class": "OC\\Files\\View",
            "type": "->",
            "args": ["/appdata_ocsg5zv5spo7"]
        },
        {
            "function": "newFolder",
            "class": "OC\\Files\\Node\\Folder",
            "type": "->",
            "args": ["*** sensitive parameter replaced ***"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/Node/LazyRoot.php",
            "line": 66,
            "function": "call_user_func_array",
            "args": [
                [
                {
                    "__class__": "OC\\Files\\Node\\Root"
                }, "newFolder"],
                ["*** sensitive parameter replaced ***"]
            ]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/Node/LazyRoot.php",
            "line": 392,
            "function": "__call",
            "class": "OC\\Files\\Node\\LazyRoot",
            "type": "->",
            "args": ["newFolder", ["*** sensitive parameter replaced ***"]]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/AppData/AppData.php",
            "line": 92,
            "function": "newFolder",
            "class": "OC\\Files\\Node\\LazyRoot",
            "type": "->",
            "args": ["*** sensitive parameter replaced ***"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/AppData/AppData.php",
            "line": 110,
            "function": "getAppDataRootFolder",
            "class": "OC\\Files\\AppData\\AppData",
            "type": "->",
            "args": []
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Files/AppData/AppData.php",
            "line": 139,
            "function": "getAppDataFolder",
            "class": "OC\\Files\\AppData\\AppData",
            "type": "->",
            "args": []
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php",
            "line": 141,
            "function": "getFolder",
            "class": "OC\\Files\\AppData\\AppData",
            "type": "->",
            "args": ["/"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Installer.php",
            "line": 221,
            "function": "get",
            "class": "OC\\App\\AppStore\\Fetcher\\Fetcher",
            "type": "->",
            "args": []
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Installer.php",
            "line": 506,
            "function": "downloadApp",
            "class": "OC\\Installer",
            "type": "->",
            "args": ["bruteforcesettings"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/private/Setup.php",
            "line": 411,
            "function": "installAppBundle",
            "class": "OC\\Installer",
            "type": "->",
            "args": [
            {
                "__class__": "OC\\App\\AppStore\\Bundles\\CoreBundle"
            }]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/core/Controller/SetupController.php",
            "line": 75,
            "function": "install",
            "class": "OC\\Setup",
            "type": "->",
            "args": ["*** sensitive parameters replaced ***"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/lib/base.php",
            "line": 945,
            "function": "run",
            "class": "OC\\Core\\Controller\\SetupController",
            "type": "->",
            "args": ["*** sensitive parameters replaced ***"]
        },
        {
            "file": "/opt/wwwroot/Nextcloud/index.php",
            "line": 37,
            "function": "handleRequest",
            "class": "OC",
            "type": "::",
            "args": []
        }],
        "File": "/opt/wwwroot/Nextcloud/lib/private/Files/Storage/Common.php",
        "Line": 577,
        "CustomMessage": "--"
    },
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0",
    "version": "19.0.0.12"
}

Hello,
I sum up. You have nginx and nc without docker.
Can you display your relevant nginx log in /var/log/nginx/error.log?

Iā€™ve found out, just like the log says:

Call to undefined function OC\\Files\\Storage\\filter_var()

It turns out that function ā€œfilter_var()ā€ is missing, so I install php7-mod-filterļ¼Œwhich is not mentioned on official documentation. After that, I restart nginx and php-fpm, and everythings fine now.