0

I have a Laravel app hosted on Linux through GoDaddy.

My directory root is 'public_html/public' I store my files in 'public_html/site/storage/app/public'

Laravel recommends a symbolic link from the directory root: 'public_html/public/storage' to 'public_html/site/storage/app/public'

I SSHed into my webserver and created the symbolic link, and the link follows through correctly in my file browser. However, when I go to my website itself (site.com/storage/text.txt) I get the following error:

You don't have permission to access /public/storage/text.txt on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Any idea how to fix this? Thank you

0

This could be a variety of issues, I'd start with:

1) Check web server config, make sure Apache has Options +FollowSymLinks specified as per https://stackoverflow.com/questions/12120035/what-is-options-followsymlinks

2) Ensure the symlink has the same file owner as its source file and that both files and directories are readable by the web server

3) Make sure the link is headed in the correct direction

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.