Laravel, Unknown error after deploying to LIFE server, 500 Internal Server Error


Marcelo Perry

I just deployed a Laravel 8 project from my local server to a LIFE server and apparently everything works fine, I successfully run Composer( composer update), composer throws no error messages, the LIFE server's domain is linked to the folder /project/public. I also It ran successfully php artisan migrateand I can see the tables created by artisan in the database, so the application is connecting correctly with the database.

I also changed the permissions of the main project folder to 755 and the permissions of the storage folder to 777.

sudo chmod -R 777 ./storage
sudo chmod -R 777 ./bootstrap/cache/
sudo chmod -R 664 /mainprojectfolder

I successfully generated a new KEY with artisan, and successfully cleared the cache with artisan... That is to say, I have read all the tutorials I found on the Internet, but the problem has not been solved.

php artisan key:generate

I also managed to clear the project cache, as suggested by the official documentation:

php artisan config:cache
php artisan route:cache
php artisan view:cache

I also created the .htaccessfile:

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

When I browse the server URL, I see that the browser redirects to domain/login correctly, which is correct, as long as I'm not logged into the app it redirects to the login page. Then the browser shows the classic:500 Internal Server Error - The server encountered an internal error or misconfiguration and was unable to complete your request...

Unfortunately, I don't have access to the server logs, as the server is a shared virtual server, so I can't figure out what the problem is.

Can you recommend it?

Marcelo Perry

After many attempts finally found a solution, the .htaccessfile was wrong, I replaced:

RewriteRule ^ index.php [L]

and:

RewriteRule ^ /index.php [L]

I added the /previous index.php. This has solved the problem.

Related


Deploying Website: 500 - Internal Server Error

Jacob Jedricek I am trying to deploy an ASP.NET application. I have deployed the site to IIS, but when accessing it with a browser it shows me this: Server Error 500 Internal Server Error. There is a problem with the resource you are looking for and cannot be

Deploying Website: 500 - Internal Server Error

Jacob Jedricek I am trying to deploy an ASP.NET application. I have deployed the site to IIS, but when accessing it with a browser it shows me this: Server Error 500 Internal Server Error. There is a problem with the resource you are looking for and cannot be

Deploying Website: 500 - Internal Server Error

Jacob Jedricek I am trying to deploy an ASP.NET application. I have deployed the site to IIS, but when accessing it with a browser it shows me this: Server Error 500 Internal Server Error. There is a problem with the resource you are looking for and cannot be

Laravel 500 Internal Server Error?

Joel I created a project in laravel and when I migrated to live server it gave me 500 internal error. This is my first attempt to install laravel. The problem occurs when I run rm -rf public_htmlANDln -s laravel/public/ public_html Here is the error log: [Sat

Laravel 500 Internal Server Error?

Joel I created a project in laravel and when I migrated to live server it gave me 500 internal error. This is my first attempt to install laravel. The problem occurs when I run rm -rf public_htmlANDln -s laravel/public/ public_html Here is the error log: [Sat

500 - Internal server error after posting on server

Eugene Wajda After publishing my asp mvc application to the plesk host, I am getting a 500 error. When I run it locally, everything works fine. I checked my connection string. This connection string is correct and can be used for other applications hosted on t

500 - Internal server error after posting on server

Eugene Wajda After publishing my asp mvc application to the plesk host, I am getting a 500 error. When I run it locally, everything works fine. I checked my connection string. This connection string is correct and can be used for other applications hosted on t

error 500 (internal server error) ajax and laravel

Juan Rincon Hi all, I have a problem with the comment system in laravel and ajax. Actually, it only works with php, but I have a problem with ajax. Here is the error message: Status Code: 500 Internal Server Error. And the error says: 1/3 SQLSTATE[23000]: Inte

error 500 (internal server error) ajax and laravel

Juan Rincon Hi all, I have a problem with the comment system in laravel and ajax. Actually, it only works with php, but I have a problem with ajax. Here is the error message: Status Code: 500 Internal Server Error. And the error says: 1/3 SQLSTATE[23000]: Inte

Error Ajax and Laravel 500 (Internal Server Error)

Nguyen Shou I'm trying to use AJAX in Chrome and it doesn't work. Here is my code you can see below. Here is a copy of my web.php file. Route::view('menu','home.menu',['categories'=> App\Categories::orderBy('name')->get()->take(11),'active' => 'menu'])->name('

Laravel 5.2 Error 500 (Internal Server Error)

Alabja I'm trying to deploy a laravel project to a shared hosting platform, but it keeps giving me this error 500 -Internal Server Error. It's currently working on my localhost. I've checked other sites, but to no avail even though .htaccess is considered a cl

error 500 (internal server error) ajax and laravel

Juan Rincon Hi all, I have a problem with the comment system in laravel and ajax. Actually, it only works with php, but I have a problem with ajax. Here is the error message: Status Code: 500 Internal Server Error. And the error says: 1/3 SQLSTATE[23000]: Inte

500 error when deploying laravel on server with nginx

Evolution Roff I am learning Laravel now. I made a blog demo and it works fine with MAMP on my mac. But when I deploy it on my remote server it works now! I get nothing but 500 errors! I searched the problem many times, I reinstalled my vps and got a new Larav

Internal server error (500)

Chemical 004 have this problem if(attributeName == 'id'){ var id = dataValue; $("#discard").click(function(){ alert(id); $.ajax({ url: 'deleteob/' + id }); }); } I have this route in web.php Route::get('/dele

Internal server error 500 after 4 postbacks

Muhammad Javahery I'm running into a strange problem when writing a web application in ASP.NET/VB.NET (framework version 4.0). After 4 successful partial postbacks with any button on the page (static, dynamic, or any combination of these ), I get the following

Internal server error 500 after removing wwwroot

Ehsan Akbar I'm trying to upload my website, unfortunately, I made a mistake, I deleted 3 folders in the root directory i.e. logs and data and wwwroot . So after manually recreating these folders I got this error: 500 - Internal server error. There is a proble

Internal server error 500 after removing wwwroot

Ehsan Akbar I'm trying to upload my website, unfortunately, I made a mistake, I deleted 3 folders in the root directory i.e. logs and data and wwwroot . So after manually recreating these folders I got this error: 500 - Internal server error. There is a proble

500 (Internal Server Error) ajax and laravel

Juan Rincon Hi all, I'm having trouble editing comments with Ajax in Laravel 5.4 This works in modal "press edit and modal open" so the problem is when you click on edit "editor" i get a 500 (internal server error) First I will show you my js code: $(document)

500 Internal Server Error in Ajax call (Laravel)

tattered hassan I'm trying to use an ajax call to get dependent selections. After selecting a Class, the related Groups should appear. However, I am getting a 500 Internal Server Error on the console. Can someone help me get the expected result? On admission,

Laravel Ajax catch 500 Internal Server Error

Bergkamp 10 I'm using Laravel with Ajax and I've tried the -catch block in my controller: try { something... } catch (\Exception $e) { return response()->json([ 'status' => 'error', 'message'=> 'error message'

500 (Internal Server Error) with Laravel and Docker

Janaka Pushpakumara) I am creating a Laravel PHP application in Docker. First, I installed the Laravel app using laravel new laravelDockerApp It was created successfully. I confirmed that it is set by the built-in server php artisan serve Then use Docker to

Laravel Project, 500 Internal Server Error

Prakhar Singh I developed a simple application in laravel (5.6) and everything works fine on my PC (Windows 10/Xamp/PHP 7.1). But when I upload the same project to a VPS running Cent OS, with PHP 5.6 (expected) Parse error: syntax error, unexpected '?' in /hom

Laravel 500 Internal Server Error Ajax

Brainstorming I am developing a website using Laravel and Ajax. I have a problem when I try to use the hasMany method to return all messages (message model) that belong to a specific user (user model). web.php Route::get('/test', 'UserController@testFunction')

500 Internal Server Error Ajax Laravel

cyber8200 I am trying to publish http://localhost:8888/test JS $('.saveBTN').click(function (event) { $( "form#editForm" ).on( "submit", function( event ) { event.preventDefault(); var inputs = {}; $("#editForm :input").each(function()

500 Internal Server Error in Ajax call (Laravel)

tattered hassan I'm trying to use an ajax call to get dependent selections. After selecting a Class, the related Groups should appear. However, I am getting a 500 Internal Server Error on the console. Can someone help me get the expected result? On admission,

laravel with ionic: 500 (Internal Server Error)

Frankley Is there anything wrong with my code below? It always shows caz: 500 (Internal Server Error) I don't know why, hope someone can help, thanks... I've searched for a day but there is no solution. Am I missing something? And I'm using ionic for a mobile

500 (Internal Server Error) ajax and laravel

Juan Rincon Hi all, I'm having trouble editing comments with Ajax in Laravel 5.4 This works in modal "press edit and modal open" so the problem is when you click on edit "editor" i get a 500 (internal server error) First I will show you my js code: $(document)

500 (Internal Server Error) Laravel delete method

Junid Ansari I am trying to delete using ajax in laravel but it is showing me an error like 500 (internal server error) I know it is a token error but I am also passing a token but still the same mistake. I can delete a record without ajax. route: Route::get('