在共享主机中仅使用 FTP 部署 Laravel 5 [英] Deploy Laravel 5 using only FTP in a shared hosting

查看:19
本文介绍了在共享主机中仅使用 FTP 部署 Laravel 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将 Laravel 5 项目部署到客户端主机.

I need to deploy a laravel 5 project to a client host.

我的客户的计划是基本托管:Linux + MySql 没有 cpanel 或类似的(即没有管理面板).

The plan of my client is basic hosting: Linux + MySql without cpanel or similar (i.e. no admin panel).

我只能通过 ftp 访问,并且只能访问名为 www.mycustomerweb.com 的文件夹.这意味着我无法在 www.mycustomerweb.com 文件夹的同一级别创建目录.只有在里面(我认为它被称为共享托管).

I have access only via ftp and only to a folder named www.mycustomerweb.com. It means I can not create a directory at the same level of www.mycustomerweb.com folder. Only inside it (I think it is called shared hosting).

一年前,我以这种方式部署了一个用 Laravel 4 制作的项目:

One year ago, I deployed a project made with Laravel 4 this way:

  1. 摆脱了将其内容移动到根文件夹并更新 index.php 和 bootstrap.php 的公共文件夹
  2. 在本地主机(使用 Xampp)完成整个项目
  3. 通过 ftp 将所有文件上传到 www.myclientweb.com.

我的问题是:

  1. 我在 Laravel 4 项目中做的一切都好吗?我是否陷入了安全问题(我的意思是网站安全)?

  1. Did I do everything all right with laravel 4 project? May I have fallen into security issues (I mean, is the site safe)?

如何将 Laravel 5 项目部署到同一个站点?在 Laravel 5 中,我无法像在 Laravel 4 中那样删除公共文件夹.

How do I deploy a laravel 5 project to the same site? In Laravel 5 I can not get rid of public folder as I did with Laravel 4.

现在,我已经在本地主机上全新安装了 Laravel 5,然后我通过 ftp 将所有文件上传到 www.myclientweb.com 文件夹:

Right now, I have set up a fresh installation of Laravel 5 on localhost and then I have uploaded all files to www.myclientweb.com folder via ftp:

  • I can see wellcoming page of laravel at http://www.myclientweb.com/public.
  • I can not see anything at http://www.myclientweb.com/
  • And also I CAN SEE .env CONTENT AT http://www.myclientweb.com/.env ???????

这肯定不是正确的方法...

Surely this is not the right way...

我在网络和 Stackoverflow 上搜索了很长时间,但没有运气.

I've had a long searching through the web and Stackoverflow with no luck.

真的很感激任何帮助.

感谢阅读.

推荐答案

L4 和 L5 没有区别,所以做和 L4 一样的事情.

There is no difference between L4 and L5, so do the same thing you did for L4.

这篇关于在共享主机中仅使用 FTP 部署 Laravel 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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