I've setup my production server on a shared hosting my directory structure looks like this (my project is placed at same level as public):
/home/user/my-laravel-project/
/home/user/public_html
This is how I'm storing my data in Storage > Public Disc
$data->store('path/to/data', 'public');
On production, using SSH, when I run this command php artisan storage:link. It creates a symlink between storage/app/public and my-laravel-project/public I want this link to be created between storage/app/public and /home/user/public_html
What I've tried
- Tried removing
my-laravel-project/publicthen triedphp artisan storage:link.. it failed with an errorNo file or directory - I tried changing storage path from
storage_path('app/public)topublic_path()underconfig/filesystem.phpbut no success - I've also tried to create symlink using shell command
ln -nsf /home/user/my-laravel-project/storage/app/public /home/user/public_htmlbut no success
Tried many other little tweaks but nothing works for me .. I'm looking for a proper solution to create a symlink between storage/app/public and /home/user/public_html on my shared server
Note I don't want to change paths in config/filesystems.php as that's not a proper solution
My current server is setup on Siteground with php version 7.0.32 and Laravel 5.5.43
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire