Installing Mautic 5 with Nginx Unit

Your software
My Mautic version is: 5.15
My PHP version is: 8.2
My Database type and version is: mysql

My unit config:
{
“listeners”: {
“*:80”: {
“pass”: “routes”
}
},

"routes": [
    {
        "match": {
            "uri": [
                "*sql",
                "*.bak",
                "*~"
            ]
        },

        "action": {
            "return": 404
        }
    },
    {
        "match": {
            "uri": [
                "/app/*",
                "/autoload.php",
                "/robots.txt",
                "/favicon.ico"
            ]
        },

        "action": {
            "pass": "applications/mautic/direct"
        }
    },
    {
        "match": {
            "uri": [
                "!/index.php*",
                "*.php"
            ]
        },

        "action": {
            "return": 404
        }
    },
    {
        "action": {
            "share": "/var/www/html/docroot$uri",
            "fallback": {
                "pass": "applications/mautic/index"
            }
        }
    }
],

"applications": {
    "mautic": {
        "type": "php",
        "targets": {
            "direct": {
                "root": "/var/www/html/docroot/"
            },

            "index": {
                "root": "/var/www/html/docroot/",
                "script": "index.php"
            }
        }
    }
}

}

Your problem
My problem is: I get error before getting to install screen. Propably I have done wrong unit configuration. Anyone tried to use mautic with unit?

These errors are showing in the log: No errors in log, but in container curl shows:

Oops! An Error Occurred


The server returned a “500 Internal Server Error”.

<p>
    Something is broken. Please let us know what you were doing when this error occurred.
    We will fix it as soon as possible. Sorry for any inconvenience caused.
</p>

Steps I have tried to fix the problem: I have tried to google tutorials or examples but no success. I have used drupal and matomo examples, but since I don’t have enough knowledge of matomo it is difficult. I am new with both mautic and unit.

Any help would be appreciated, Thanks.
ANd I am running mautic in debian container based on docker.io/unit:php8.2 and installed mautic on top of that.