在Cpanel中托管Laravel无法运行应用程序

时间:2020-07-09 22:15:00

标签: laravel cpanel

当我尝试访问网站上的家庭路线时遇到问题,但似乎没有通过 index.php

形式 要求

dir和 $ app 是有效的,因为当我 dd(1); 之后,它会在网站中显示结果

require __DIR__.'/system/vendor/autoload.php';

$app = require_once __DIR__.'/system/bootstrap/app.php';

dd(1);

但是,在内核中处理传入请求时出现问题,这意味着在同一文件(index.php)中运行应用程序

enter image description here 发送响应后的错误

The GET method is not supported for this route. Supported methods: HEAD.

2 个答案:

答案 0 :(得分:1)

您不应弄乱这些文件。似乎您尚未从应用程序定义文档根目录。

确保将文档根目录设置为项目文件夹内的文件夹public/

答案 1 :(得分:0)

找到解决方案,

我应该将基本URL用作“ /”而不是“ / FolderProject”

  pathInfo: "/"
  requestUri: "/"
  baseUrl: ""
  basePath: ""