I develop a Laravel Api in local it's work, when I deploy I have a error 500
.
- I copied the folder to the server.
- I moved the public folder to root and changed the path in
index.php
. - I modify the file .env with the prod value.
With I test with postman my route https://my-domain/public/api/v1/mytest
: I have a error 500.
What did i miss ?
CodePudding user response:
Please be sure you have followed all the steps. I assume you do not use a subdomain.
- Move your zipped project to a folder in the server (e.x. /home/mollusk/project)
- Unzip the project
- After unzipping your project, move everything under public folder into public_html folder (e.x. /home/mollusk/public_html)
- Edit index.php under public_html folder changing
$app = require __DIR__.'/../bootstrap/app.php';
to
$app = require __DIR__.'/../project/bootstrap/app.php';
- Give your domain name as value to APP_URL variable in .env file
APP_URL=https://my-domain
CodePudding user response:
I resolve this problem. The version lumen in dev and prod was different. I upgraded the dev version (5.8) to be in phase with the server (8.x) and it's work !