Laravel 5.1在主机上上传 [英] Laravel 5.1 upload on host

查看:62
本文介绍了Laravel 5.1在主机上上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 Laravel 5.1 php框架在我的本地XAMPP服务器上构建了一个Web应用程序.

I have used the Laravel 5.1 php framework to build a web application on my local XAMPP server.

  1. 哪些文件或文件夹应该上传到我的共享主机服务器上?
  2. 是否应上传根目录下的.env文件?
  3. 在这种情况下,如果此文件中包含敏感信息(例如数据库连接密码),是否存在安全风险?
  1. Which files or folders should be uploaded on my shared host server?
  2. Should the .env file at root be uploaded?
  3. In this case, if sensitive information such as database connection passwords are in this file, is there a security risk?

推荐答案

  1. 所有项目文件应在项目根目录\var\www\project下上传(项目=所有laravel项目文件夹和文件,而\var\www\project\public是您的域指向的位置. 存储空间应具有写权限.

  1. All project files should be uploaded under project root \var\www\project (project = all laravel project folder and files and \var\www\project\public is where your domain pointing. Storage should have write permission.

.env将位于项目根目录下,并且不能公开访问.

.env will be under project root and it is not available for public access.

.env将无法公开访问,如果这样的话,则说明您的Web服务器存在配置问题.

.env won't be accessible for public, if it is then you have a configuration problem with you web server.

这篇关于Laravel 5.1在主机上上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆