【发布时间】:2016-05-03 18:58:40
【问题描述】:
这是我第一次尝试在我的共享主机帐户上部署我的 Laravel 应用程序。
文件夹结构如下:
|--laravel
|--app
|--GoPublic.php // use to point to new location
|--bootstrap
|--config
|--database
// more folders
|--public_html
|--app // my subdomain document root
|--assets
|--index.php // GoPublic.php point to this file
当我转到我的子域网址时,我得到了这个:
我检查了我的 error.log 文件并收到以下 403 禁止错误:
[autoindex:error] [pid 910782] [] AH01276: Cannot serve directory /home/user/public_html/app/: No matching DirectoryIndex (index.php,Index.html,Index.htm,index.html.var,index.htm,index.html,index.shtml,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.phtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html) found, and server-generated directory index forbidden by Options directive
希望任何人都可以帮助我。谢谢!
【问题讨论】:
-
你已经拆散了 Laravel 目录结构。 /public/index.php 是网络服务器的入口点。就你所拥有的而言,它是如此特定于你的环境,没有人可以说可以提供帮助。
-
我应该怎么做才能解决这个问题?
-
您希望保持 Laravel 的结构不变,并将您的子域指向 /laravel/public/。
-
当我指向 /laravel/public/ 时出现同样的错误