Troubleshoot 500 server error in Laravel website – show error message in Laravel

Hello guys, In this tutorial I wanna share about how to troubleshoot 500 internal server error in Laravel website. By reading this article you will know the ways in troubleshooting of 500 server error .

Troubleshooting an HTTP 500 internal server error is like solving a mystery.

You don’t know what exactly happened or why it happened — all you know is that something’s wrong and you need to fix it. Best habit of troubleshooting 500 server error is doing to know error massage instead of error code.In laravel website go to root folder of webserver.Default root folder of web server is var/www/html.By typing the following command in your terminal and go your website’s root folder

cd /
cd var/www/html

And then,Enter your website folder by typing “cd foldername”

show hidden folder by typing the following command

ls -a
Now you see the hidden file

type the following command to open .env file and change APP_DEBUG=false to APP_DEBUG=true

sudo nano .env

Next step is to change ‘debug’ => (bool) env(‘APP_DEBUG’, false) to ‘debug’ => (bool) env(‘APP_DEBUG’, true), in app.php.

Type the following command to change app.php and save it.

sudo nano config/app.php

Now you see the error message in your website home page instead of 500 server error.So you can find out what is the reason for your error.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top