访问被拒绝:存储符号链接的403错误。

huangapple go评论58阅读模式
英文:

Access Denied: 403 Error for Storage Symbolic Link

问题

我遇到了一个服务器无法访问文件的问题。以下是相关地址:

错误信息:

> 权限不足
您无权访问此资源。服务器无法读取htaccess文件,为确保安全拒绝访问

主地址:
/home/admin/domains/{mydomain.com}

源地址:
/home/admin/domains/{mydomain.com}/source

符号链接地址:
/home/admin/domains/{mydomain.com}/public_html/storage

存储符号链接:
/home/admin/domains/{mydomain.com}/source/storage/app/public

当我在Laravel中保存文件时,一切正常。然而,当我尝试通过网站访问文件时,我收到403错误。

谢谢阅读。

英文:

I have an issue with the server not being able to access files. Here are the relevant addresses:

This is Error :

> Forbidden
You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe

Main address:
/home/admin/domains/{mydomain.com}

Source address:
/home/admin/domains/{mydomain.com}/source

Symblink address:
/home/admin/domains/{mydomain.com}/public_html/storage

Storage symlink:
/home/admin/domains/{mydomain.com}/source/storage/app/public

When I save a file in Laravel, it works fine. However, when I try to access the file through the website, I receive a 403 error.

Thank you for reading.

答案1

得分: 0

ln -s /home/admin/domains/{domain.com}/{源文件位置}/storage/app/public/  /home/admin/domains/{domain.com}/public_html/storage
英文:

Laravel , Apache .

ln -s /home/admin/domains/{domain.com}/{whne source files}/storage/app/public/  /home/admin/domains/{domain.com}/public_html/storage

huangapple
  • 本文由 发表于 2023年5月29日 08:45:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76354112.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定