我正在尝试使用Nginx + Phalcon。所以我有根文件夹(应用程序)和我的公共文件夹(应用程序/公共)。Heroku Procfile不能正常工作
根(应用程序)我有里面的Procfile:
web: vendor/bin/heroku-php-nginx -C nginx_app.conf public/
而且在我的公用文件夹,我有我的index.php
<?php exit('hello');
有了这个简单的例子,应该不会打印打招呼当我访问url myapp.herokuapp.com?
如果我的想法是正确的,哪个不起作用。我的第二个问题是nginx_app.conf似乎没有被服务器读取。因为我尝试访问的每个f *页面都有404个。
那么,我做错了什么?
[增订]
这里的日志:
heroku[web.1]: State changed from down to starting
heroku[web.1]: Starting process with command `php -S 0.0.0.0:57262`
heroku[web.1]: State changed from starting to up
app[web.1]: [Tue Apr 7 11:08:07 2015] 10.185.81.31:28258 Invalid request (Unexpected EOF)
app[web.1]: [Tue Apr 7 11:08:07 2015] 172.19.28.141:33686 Invalid request (Unexpected EOF)
heroku[router]: at=info method=GET path="/" host=myapp.herokuapp.com request_id=d39f119a-fd95-4887-809f-74712925606f fwd="200.221.158.131" dyno=web.1 connect=2ms service=4ms status=404 bytes=668
app[web.1]: [Tue Apr 7 11:08:44 2015] 10.61.196.230:38679 [404]:/- No such file or directory
[增订]
$ git push ...
[...]
remote: -----> Discovering process types
remote: Procfile declares types -> web
$ heroku run bash
$ cat Procfile
~ $ : vendor/bin/heroku-php-nginx public/~ $
而且根据documentation应该
heroku run bash
Running `bash` attached to terminal... up, run.5662
$ cat Procfile
web: vendor/bin/heroku-php-apache2
一个小细节,我曾尝试:
cat Procfile
~ $ vendor/bin/heroku-php-nginx public/c/~ $
vendor/bin/heroku-php-nginx public/
DOCUMENT_ROOT changed to 'public/'
Optimzing defaults for 1X dyno...
4 processes at 128MB memory limit.
Starting php-fpm...
Starting nginx...
我等待着......让我们看看会发生什么
dyno启动后'heroku logs'的输出是什么? – dzuelke
嘿!看到上面的更新。 – Pablo
cat -v Procfile在测功机上给你什么? – dzuelke