jeudi 20 février 2020

Laravel 5.8 Fresh Deployment Not Working In Hostinger Shared Hosting

I tried to deploy a fresh laravel application. I installed a laravel 5.8 and upload to github repository.

The repository or project folder is working since I tried to run php artisan serve and it successfully shows the laravel home screen page.

I tried to connect in my shared hosting using ssh.

Here's the steps that I've done:

  1. Access thru ssh
  2. create a project folder mkdir my-assignment-calculator then cd my-assignment-calculator
  3. Clone project repository. git clone **repo_url**
  4. Navigate the project folder, cd my-assignment-calculator
  5. Copy .env file, cp .env-example .env
  6. Install composer packages. composer install
  7. Then copy all files in Public folder to public_html folder
  8. Go to public_html then update index.php, nano index.php
  9. In index.php, I update these two lines, the vendor/autoload.php and the bootstrap/app.php

Here's the sample code for #9:

require __DIR__.'/../my-assignment-calculator/my-assignment-calculator/vendor/autoload.php';

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once 
__DIR__.'/../my-assignment-calculator/my-assignment-calculator/bootstrap/app.php';

Here's the structure of my project folder

-public_html
-domains
    --my_assignment_calculator
    --my_assignment_calculator
        ---laravel files

The current output is only white screen. I tried to check the developers tools or devtools, there's no error. It's just a white background. It's the same as before.

So what is the expected output

Should display laravel welcome or home screen page



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2V8ex0U
via IFTTT

Aucun commentaire:

Enregistrer un commentaire