Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

brtbrt's avatar

How to debug in production? Where are the logs?

I deployed from local to production and some screens give "500 server error". How can I debug without touching .ENV. Also, where can I find the logs?

0 likes
6 replies
Ben Taylor's avatar

Logs are in storage/logs. The file is laravel.log

brtbrt's avatar

Found the logs, they didn't say anything valuable. After setting app_debug = true I got a more descriptive error. Still confused on how to do this properly (without setting app_debug=true). What command do you use to see the latest log entries? I used:

tail -n 20 storage/logs/laravel.log

But the logs are very high level:

#67 /public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php(49): Illuminate\Pipeline\Pipelin e->Illuminate\Pipeline\{closure}() #68 /public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\HandleC ors->handle() #69 /public_html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(39): Illuminate\Pipeline\Pipel ine->Illuminate\Pipeline\{closure}() #70 /public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\Http\Middleware\TrustPr oxies->handle() #71 /public_html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illum inate\Pipeline\{closure}() #72 /public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(165): Illuminate\Pipeline\Pipeline-> then() #73 /public_html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(134): Illuminate\Foundation\Http\Ke rnel->sendRequestThroughRouter() #74 /public_html/public/index.php(52): Illuminate\Foundation\Http\Kernel->handle() #75 {main}

jlrdw's avatar

@brtbrt Just checking, because if setup wrong you could get errors as well. Checking for correct folder structure is just part of the troubleshooting.

Edit:

Any errors showing in the nginx / apache error logs.

Please or to participate in this conversation.