The symbolic links are not automatically followed by the server.
You have to specify the FollowSymlink option in the apache configuration (assuming you are using the apache server), for example in the .htaccess file.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I know it's not the most ideal way to deploy a Laravel project, but this particular one is a small temporary project and I would like to deploy it via my reseller package.
Everything works perfect on development server and I deployed the way it did many times in the past:
public function boot(): void
{
$this->app->bind('path.public',function(){
return base_path('public_html');
});
}
I created the database and imported a database dump from my local machine.
Everything works perfectly, apart from the symlink that doesn't seem to work. I supposed it should work out of the box, since it did on the local machine, but that is not the case.
I tried to establish the link with the following route:
Route::get('/linkstorage', function () { $targetFolder = base_path().'/storage/app/public'; $linkFolder = $_SERVER['DOCUMENT_ROOT'].'/storage'; symlink($targetFolder, $linkFolder); });
Images that are uploaded using a form in the application are getting stored in the storage/app/public folder, but are not displayed on the site.
Can anyone help me out here?
Thanks!
UPDATE: Addition: I do have ssh access to the server...
Please or to participate in this conversation.