首页 文章

将laravel移动到新服务器

提问于
浏览
1

我有一个laravel项目,并希望在另一个服务器和域上制作它的副本 .

我做了什么:

  • 下载了我电脑上的所有文件

  • 将所有文件上载到新服务器

  • 导出数据库并导入到新数据库

  • 更改了.env中的数据库设置

新服务器public_html文件夹是我用于laravel public_html的文件夹 . 因此文件和文件夹结构应与原始服务器上的相同 .

我认为这应该足够了但是当我访问新域时我得到的是:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the 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.

有什么可能是错的?

1 回答

  • 0

    你运行了以下命令吗?

    sudo chmod 755 -R laravel-project-name            // ur project name
    sudo chmod -R o+w laravel-project-name/storage    // same here
    

    我可以问你使用哪个版本和平台?如果你使用ubuntu使用以上既不谷歌你的 .

相关问题