在子域中托管后如何在laravel应用程序中修复403禁止的错误

时间:2020-10-14 09:03:50

标签: laravel laravel-5 http-status-code-404 cpanel laravel-7

当我尝试从子域访问Laravel应用程序时,出现403禁止错误。 enter image description here

我的项目在cPanel文件夹中的public_html文件之外,该文件夹名为app。 enter image description here

通过在cPanel终端中运行此代码,我创建了指向项目public_html的符号链接 enter image description here

ln -s ~/app/public_html/ ~/public_html

我已将权限644设置为项目目录

1 个答案:

答案 0 :(得分:0)

这可能会导致无限循环,这就是问题所在。但是,您也许可以创建到任何子目录的符号链接,它将正常工作。

ln -s ~/app/public/uploads ~/public_html/uploads

可以正常工作。