How to upload a Laravel pro server project

0

I did some things to test Laravel, I did everything in my localhost with Xampp and Composer, now I need to upload to DreamHost and I'm not getting it, when I try to access the project on DreamHost I get a 500 error code, upload it all the project, including the folder "vendor" , to upload to DreamHost, I only changed the file ".env" by changing the following fields:

APP_URL=http://localhost

DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

I've changed the above fields with DreamHost data.

Can you help me? What other changes do I have to make? Remembering that I am accessing the project in the DreamHost url plus the "public/" folder, example: "http://projetolaravel.com.br/public/" , and getting the error 500

    
asked by anonymous 08.11.2018 / 13:58

2 answers

0

Problem solved! It was a simple thing, I had to change my PHP version on the DreamHost server, I was using PHP 7.0 and I switched to PHP 7.2!

    
12.11.2018 / 18:26
0

Friend, get all that is inside the public folder of laravel, and put in the public folder of the server, which will be the public_html or www ...

The rest goes one level up. Set up bank on .env

Go to the index.php file for the public folder and look for this line of code.

$app = require_once __DIR__.'/../bootstrap/app.php';

Below it, place the following code.

$app->bind('path.public', function() {
    return __DIR__;
});

This will speak pro laravel what is the public folder. I already put this code in the skeleton that I use in all projects.

At-te;

    
08.11.2018 / 17:45