Support the ongoing development of Laravel.io →
Installation Configuration Requests

Hello everyone. I installed clean Laravel on LEMP (Nginx,PHP-FPM...) Everything right, but debug laravel doesn't work correct.

I have some example:

If i go to ....http://domain.com/blabla or ....http://domain.com/somethinghere

Laravel work correct when show me error "Whoops! There was an error."

Now i have a routes signin Route::get('/signin', function() { echo "This is signin page"; });

I access http://domain.com/signin Ok, that work fine.

But if i knowingly write wrong code. Example: Route::get('/signin', function() { echoooo "This is signin page"; });

Browser return Nginx error page (50x) "nginx error! The page you are looking for is temporarily unavailable. Please try again later."

So, i think in case browser should return Error Page Debug of Laravel (Whoops! There was an error....), and i can know which line i write false.

Here is my nginx config. http://pastebin.com/Uva0u13K

Someone can give me solution. Thank you very much!

Last updated 2 years ago.
0

Hey, you need to enable debug mode in app.php under app/config. If it's production server, you should NOT have this on, as it exposes your code to the public. For local development you should try Homestead :)

Last updated 2 years ago.
0

Yes. I enabled

After checking on server. I see that error was writen to nginx error log file : http://pastebin.com/9T3qMnnq

But why it wrote to here ? It should show on debug page of Laravel same as other error!

Last updated 2 years ago.
0

Hi all. After try many ways, i knew how to fix. In nginx vhost config. You should comment line: error_page 500 502 503 504 /50x.html; So, Laravel will process debug instead pass to Nginx log.

Last updated 2 years ago.
0

Slightly related, but I was having an issue with Homestead 2 not rendering the Laravel 4.2 debugger but instead Nginx was displaying I presume it's default 404 page. Even with appropriate debug settings per environment I could not get this working.

Finally the above advice to simply comment out the error_page 404 /index.php; in my nginx.conf file worked. Still learning Laravel so not sure why I needed to do this but thought to post it up here for anyone else.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

callmehuyv callmehuyv Joined 16 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.