> ## Documentation Index
> Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQ

> Troubleshoot issues you might encounter using [Laravel](https://laravel.com/), a PHP framework on Upsun Cloud.


## How can I access my application logs?

To display the application log file (`/var/log/app.log` file), run the following command:

```bash theme={null}
upsun log app --tail
```

All the log messages generated by your app are sent to this `/var/log/app.log` file.
This includes language errors such as PHP errors, warnings, notices,
as well as uncaught exceptions.

The file also contains your application logs if you log on `stderr`.
This log doesn't include the default `laravel.log` located in `/storage`.

> [!NOTE]
>
> Upsun Cloud manages the `app.log` file for you.
> This is to prevent disks from getting filled and using very fast local drives instead of slower network disks.
> Make sure your apps always output their logs to `stderr`.

With Laravel, you can change your logging configuration to use `memory` and stream `php://stderr`.
In your `config/logging.php` file, add or update the following configuration:

```php config/logging.php theme={null}
'memory' => [
    'driver' => 'monolog',
    'handler' => Monolog\Handler\StreamHandler::class,
    'with' => [
        'stream' => 'php://stderr',
    ],
    'processors' => [
        // Simple syntax...
        Monolog\Processor\MemoryUsageProcessor::class,

        // With options...
        [
           'processor' => Monolog\Processor\PsrLogMessageProcessor::class,
           'with' => ['removeUsedContextFields' => true],
       ],
    ],
],
```

> [!WARNING]
>
> Warning
> If you log deprecations, make sure you **also** log them on `stderr`.

## What's this "`Oops! An Error Occurred`" message about?

The `Oops! An Error Occurred` message comes from your app and is automatically generated based on the Laravel error template.

### The server returned a "`500 Internal Server Error`"

If your app's working as expected locally but you see the previous error message on Upsun Cloud,
it usually means you have a configuration error or a missing dependency.

To fix this issue, search your application logs.
They likely contain an error message describing the root cause:

```bash theme={null}
upsun env:log app
  Reading log file azertyuiop-test-error-azerty--app@ssh.eu-5.platform.sh:/var/log/app.log
  [12-Jan-2026 11:22:08] NOTICE: fpm is running, pid 146
  [12-Jan-2026 11:22:08] NOTICE: ready to handle connections
  [12-Jan-2026 11:27:31] PHP Fatal error:  Uncaught Exception: [...]
  Stack trace: [...]
```

If the error occurs on a preview environment,
or on the main environment of a non-production project,
you can also enable Laravel's dev/debug mode to inspect the cause of the error
via the `APP_DEBUG` [environment variable](https://developer.upsun.com/docs/get-started/stacks/laravel/environment-variables.md) in your
`.environment` file or via [the CLI or Console](https://developer.upsun.com/docs/development/variables):

```bash .environment theme={null}
# Enable debug mode
export APP_DEBUG=1
# Disable debug mode
export APP_DEBUG=0
```

## Other issues

For other issues unrelated to Laravel, see [Troubleshoot development](https://developer.upsun.com/docs/troubleshooting/general.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.