Reputation: 83
I have a Laravel 5.6 application which runs on a server that hosts several php 5.6 applications with cakephp, I added some configuration for it to serve the Laravel 5.6 one with PHP 7.1 and it is working now, however, the symlink from storage is not working. I've searched about this and have tried several solutions, none of them worked.
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'visibility' => 'public',
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
],
This being my config/filesystems
symlink showing on cbash with > ls -n public/storage
I tried removing the symlink and creating it with the command
php artisan storage:link
as well as creating it with
ln -s storage/app/public public/storage/app/public
but haven't been succesful. What could possibly be wrong? If I go and check an image in public/img it works https://inversionistas.grupoidesa.com/img/avatar.png but the storage link doesn't, I've tried several times with different configurations and urls like
https://inversionistas.grupoidesa.com/storage/comp.pdf
https://inversionistas.grupoidesa.com/storage/app/public/comp.pdf
https://inversionistas.grupoidesa.com/public/comp.pdf
etc but none has worked.
Thanks in advance
These are the permitions of the folder, the permision were given with chmod recursively
Upvotes: 0
Views: 465
Reputation: 46
You need to make web server follow symbolic links For apache web server add
<VirtualHost *:80>
...
<Directory />
Options FollowSymLinks
....
</Directory>
....
</VirtualHost>
Upvotes: 1