I'm currently getting a 403 error on the storage directory.
I have tried the correct file path for both a php artisan link and the regular symlink from command line
The specific path is this one:
http://example.com/storage/app/public/category/zASySdXhEtXBaeWoz4KLJoIVLVxm3W6jRr6gHQhN.jpg
This is linked to the storage directory:
to here: example.com/public/storage/*
I created the symlink like so:
ln -s /var/www/vhosts/example.com/httpdocs/storage /var/www/vhosts/mydomain.com/httpdocs/public
The above directory is for the symlink one but for php artisan link the url is slightly different.
the permissions set for storage before were executed running:
chmod -R 775 storage/
checking permissions I get this:
ls -la ./httpdocs
drwxr--r-- 5 pacer psacln 46 Apr 8 2021 storage
Everything else works except the storage directory. I've seen the other questions regarding 403 and have attempted those fixes but nothing is working. Any idea what I'm doing wrong?
CodePudding user response:
The storage link points directly to the "app/public" folder. So the link address will look like this:
http://example.com/storage/category/zASySdXhEtXBaeWoz4KLJoIVLVxm3W6jRr6gHQhN.jpg
CodePudding user response:
first : run commint
php artisan storage:link
http://example.com/storage/category/zASySdXhEtXBaeWoz4KLJoIVLVxm3W6jRr6gHQhN.jpg