lundi 4 mars 2019

Laravel not following storage directory symlink

I developed a Laravel web app, which works fine and great on local machine but after going in production on a shared hosting server i have some issues displaying the images using the asset() helper function.

I've deployed the App following the steps bellow:

I created a directory called repositories outside the public_html (the root document of mydomain.com) and i copied inside it directory soukelafalah (contining all the files of my laravel project) I moved the laravel public directory files into the public_html directory I edited the index.php in public_html as follow:

  1. require DIR.'./../repositories/SoukElfalah/vendor/autoload.php'; $app = require_once__DIR__.'/../repositories/SoukElfalah/bootstrap/app.php';
  2. I run php artisan storage:link and the link is successfully created (it creates a public_html/storage directory)
  3. but the images are not displayed and shows a 404 error as shown in the image below.

enter image description here

also when i manually creates the storage directory and include the images and the sub-directories (images, thumbs, posts) in it, the website works fine and the images are shown.

So please, can any one point what i am i missing?

Thank you in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire