Laravel 4 以及使用 FTP 部署应用程序的方式 [英] Laravel 4 and the way to deploy app using FTP
问题描述
我对用于部署 Laravel 应用程序的方式有疑问.
I have a question about the way used to deploy a Laravel Application.
我使用 Composer 在本地开发了我的应用程序.
I have developed my application locally using Composer.
现在,我已准备好将此应用程序部署到生产环境中.
Now, I'm ready to deploy this application to the production.
我(目前)有一台仅使用 FTP 的生产服务器..
I have (at the moment) a production server that use only FTP..
我读过这个论坛:Laravel 论坛
但我认为这是不正确的..
but I think that this is not correct..
我在我的服务器上创建了一个目录,例如:http://www.myserver.com/app一个>
I have created a directory on my server for example: http://wwww.myserver.com/app
在/app 目录中,我(通过 FTP)复制了所有文件...
In the /app directory I copied (by FTP) all my files...
但这不起作用..我必须改变什么?
But this not work..I have to change something?
推荐答案
假设您的文档.根目录是 www
Let's say your doc. root folder is www
- 在您的共享主机上创建一个名为 laravel 的文件夹(在 www 之外),并将您的应用程序结构上传到此文件夹,公共文件夹除外.
- 将公共文件夹的内容上传到 www 文件夹
- 在 bootstrap/paths.php 文件中调整路径结构.
- 还要更改 www/index.php 文件中的路径以找到新的 Laravel 文件夹.
- 完成.
在以下文章中还有另外 2 个解决方案(以及我的一个更详细的解决方案):
There are 2 more solutions (and my one in more detailed as well) in the following article as well:
http://driesvints.com/blog/laravel-4-on-a-shared-主机
这篇关于Laravel 4 以及使用 FTP 部署应用程序的方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!