我试图将我的Laravel应用程序放在Heroku上。我遵循了Heroku的入门页面与Matt Staufer's guide相结合的指南。我可以推动我的应用程序并让dyno运行。但是当我打开页面时,只有一个警告应用程序错误。检查了日志,发现了这个:
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。
感谢您的帮助。
答案 0 :(得分:1)
好的,发现了问题。我的应用程序崩溃,因为我在其中使用了一些Node模块,Heroku将其检测为PHP和Node应用程序。解决方案是在Laravel中安装任何Node模块之前声明buildpack。
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php