# Installing Mautic 5 with Nginx Unit

**URL:** <https://forum.mautic.org/t/installing-mautic-5-with-nginx-unit/31905>\
**Category:** Mautic 5 Install/Upgrade Support\
**Created:** [April 30, 2024, 9:06am UTC](https://forum.mautic.org/t/installing-mautic-5-with-nginx-unit/31905 "2024-04-30T09:06:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![artol](https://avatars.discourse-cdn.com/v4/letter/a/6bbea6/32.png) [@artol](https://forum.mautic.org/u/artol)\
**Post date:** [April 30, 2024, 9:06am UTC](https://forum.mautic.org/t/installing-mautic-5-with-nginx-unit/31905/1 "2024-04-30T09:06:39Z")

</div>

**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](http://docker.io/unit:php8.2) and installed mautic on top of that.
