在共享托管服务器(hostgator)上部署Laravel 4 [英] Deploying Laravel 4 on shared hosting server (hostgator)
问题描述
感谢您的帮助.我真的不知道该去哪里.我无法将L4应用程序部署到Hostgator.我在论坛上阅读了该指南,但是我的共享HG帐户在public_html下已经有很多应用程序,因此删除它将会是灾难性的,并且是我无法承受的风险.
I would appreciate your help. I really don't know where else to turn to. I can't deploy a L4 app to Hostgator. I read the guide on the forums, but my shared HG account already has many apps under public_html so deleting it would be catastrophic and a risk I cannot afford to play with.
是否可以像其他普通应用程序一样部署L4应用程序?
Is there a way to deploy L4 app like any other normal apps?
我想做的是以下事情:
home/myuser/public_html/domain.com/laravel/ <--- where the app should live
home/myuser/public_html/domain.com/laravel/dev <--- dev environment
在这两个文件夹中都有一个单独的git存储库(通过ssh).使用遥控器dev和prod
in both of these folders there is a separate git repository (via ssh). with remotes dev and prod
所以我只想实现:
git push prod
和
git push dev
但是当我按下时,我收到一条消息:
but when I push, I am getting a message:
dev/bootstrap/../vendor/autoload.php) [function.require]: failed to open stream: No such file or directory
/dev/bootstrap/../vendor/autoload.php' (include_path='.:/opt/php53/lib/php') in
推荐答案
结果是我没有正确安装Composer. 我通过以下方法解决了这个问题:
Turns out I had not installed Composer properly. I solved this by:
在.bashrc中的php 5.3中添加别名:
adding alias to php 5.3 in .bashrc:
alias php53='/opt/php53/bin/php'
安装Composer:
installing Composer:
curl -sS https://getcomposer.org/installer | php53
在composer.json中的脚本"中,将php替换为:/opt/php53/bin/php
(不接受别名,不知道为什么)
in composer.json, in the "scripts" replacing php with: /opt/php53/bin/php
(alias is not accepted, do not know why)
运行
php53 composer.phar install
添加到.htaccess:
adding to .htaccess:
AddType application/x-httpd-php53 .php
这篇关于在共享托管服务器(hostgator)上部署Laravel 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!