我想部署我的Laravel-Project,但它总是显示我的错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at admin to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
我的服务器结构是这样的:
/
/protected --> All Files and Folders within the project (+ /node_modules & /vendor) except the /public-folder
/public_html --> all Files and Folders within the /public-folder
我已经更改了/ storage-folder的权限,我已经将/index.php中的路径更改为
require __DIR__.'/../protected/vendor/autoload.php';
和
$app = require_once __DIR__.'/../protected/bootstrap/app.php';
有任何想法吗?
将localhost(htdocs)中的所有文件放到public_html中。还要确保托管服务器上的域重定向中没有任何重定向。内部服务器错误的主要原因是您的域未指向您定义的目录。
在我的例子中,index.php文件是
要求DIR。'/ .. / vendor / autoload.php';
$ app = require_once DIR。'/ .. / bootstrap / app.php';
一个接一个地做所有的改变,希望这对你的情况有用。我已经提到下面的参考链接请检查
https://laracasts.com/discuss/channels/laravel/laravel-deploying-to-server-using-ftp