简体   繁体   English

实时上传laravel项目

[英]Upload laravel project on live

How to upload larval project to server? 如何将幼虫项目上传到服务器?

I have uploaded larval website which is perfectly working in local computer, but when I uploaded to server same like as I am uploading other PHP website, but it is not going to view it shows a blank screen. 我已经上传了在本地计算机上可以正常运行的幼虫网站,但是当我将其上传到服务器时,就像上传其他PHP网站一样,但是它不会显示空白屏幕。

Please let me know, how to resolve this issue? 请让我知道,该如何解决?

也复制.env文件或将appkey设置为环境变量

您是否在服务器中安装了laravel并确保php版本和服务器环境符合laravel 5.2文档中的要求

Tips on deploying Laravel: 部署Laravel的提示:

  1. Make sure the server is pointing to public folder not the project folder 确保服务器指向公用文件夹而不是项目文件夹

    • Change the DocumentRoot to pointed to public folder 变化DocumentRoot到尖到public文件夹
    • Create a basic URL that return a view to test this first step 创建一个基本URL,该URL返回一个视图以测试此第一步
  2. Change the .env accordingly. 相应地更改.env Few important values are: 几个重要的值是:

    • Application key. 应用程序密钥。 Run php artisan key:generate if not available yet 运行php artisan key:generate如果尚不可用)
    • Database configurations. 数据库配置。 (Host, port, username, password) (主机,端口,用户名,密码)
    • Environment key need to be set as production . 需要将环境密钥设置为production This is not super crucial. 这不是超级关键。 It will still working but nice to do it to hide any insecure error messages 它仍然可以工作,但是很高兴隐藏任何不安全的错误消息

Check permissions on the storage directory. 检查存储目录上的权限。 The application need to be able to write to it. 该应用程序需要能够对其进行写入。

You also need to look in the logs: 您还需要查看日志:

storage/logs/laravel.log storage / logs / laravel.log

And look in your webserver error log. 并查看您的网络服务器错误日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM