【问题标题】:Laravel on Heroku Apache Not Found未找到 Heroku Apache 上的 Laravel
【发布时间】:2015-03-30 16:15:56
【问题描述】:

我试图将我的 Laravel 应用程序放在 Heroku 上。我按照 Heroku 入门页面上的指南以及 Matt Staufer's guide 进行操作。我可以推送我的应用程序并让测功机运行。但是当我打开页面时,只有应用程序错误的警告。查了一下日志,发现是这样的:

2015-01-31T05:12:29.062101+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=lifestak.herokuapp.com request_id=39e8245d-1344-492e-8bb2-06b3292cac9b fwd="120.168.0.178" dyno= connect= service= status=503 bytes=
2015-01-31T05:12:31.452920+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=lifestak.herokuapp.com request_id=156fb3e5-e2e2-4e09-a4c0-fb3c00d0829c fwd="120.168.0.178" dyno= connect= service= status=503 bytes=
2015-01-31T05:15:06.574919+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=lifestak.herokuapp.com request_id=57184fb2-ba73-48f2-8067-e7f73d47504e fwd="180.250.31.37" dyno= connect= service= status=503 bytes=
2015-01-31T05:15:08.731264+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=lifestak.herokuapp.com request_id=2f53626a-39b3-4fb8-8f3b-cbaaa7bd3ad2 fwd="180.250.31.37" dyno= connect= service= status=503 bytes=
2015-01-31T05:26:04.233233+00:00 heroku[web.1]: State changed from crashed to starting
2015-01-31T05:26:06.249014+00:00 heroku[web.1]: Starting process with command `vendor/bin/heroku-php-apache2 public/`
2015-01-31T05:26:07.962757+00:00 app[web.1]: bash: vendor/bin/heroku-php-apache2: No such file or directory
2015-01-31T05:26:08.771145+00:00 heroku[web.1]: State changed from starting to crashed
2015-01-31T05:26:08.758422+00:00 heroku[web.1]: Process exited with status 127

似乎是 apache 的错误?我认为它应该由 Heroku 服务器提供?我有点迷失在这里。仅供参考,我首先创建 Laravel 应用程序,在其上进行开发,然后从中创建一个 Heroku 应用程序。 Procfile 和 composer.lock 都在那里。

感谢您的帮助。

【问题讨论】:

    标签: php apache laravel heroku


    【解决方案1】:

    好的,找到问题了。我的应用程序崩溃了,因为我在其中使用了一些 Node 模块,而 Heroku 将其检测为 PHP 和 Node 应用程序。解决方案是在 Laravel 中安装任何 Node 模块之前声明 buildpack。

    heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
    

    【讨论】:

    • 这也发生在我身上。我将 Heroku 添加到一个正在进行的项目中,在该项目中我使用 grunt 来完成一些简单的任务。 Heroku 读取 package.js 文件并假设该项目是一个节点应用程序。
    猜你喜欢
    • 1970-01-01
    • 2015-08-18
    • 2021-03-09
    • 2017-07-23
    • 2016-05-16
    • 2018-05-30
    • 2013-03-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多