S
S
Sergey Pugovkin2019-07-15 12:43:31
PHP
Sergey Pugovkin, 2019-07-15 12:43:31

Why doesn't heroku-buildpack-php parse php code in config if config is set explicitly?

There is a small nginx + web application.
According to the instructions, I created a Procfile file with the following content:
web: vendor/bin/heroku-php-nginx -c nginx.conf -F php-fpm.conf www Inserted the default config into the
nginx.conf file As a result, in the heroku logs mistake:

nginx: [emerg] invalid host in "<?=getenv('PORT')?:'8080'?>" of the "listen" directive in /app/nginx.conf: 52

Yes, it's clear that this is php code, but why didn't it process it before passing it to nginx? What is wrong when the config is specified explicitly?
What to do, what would be processed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Pugovkin, 2019-07-15
@Driver86

Renamed nginx.conf to heroku.conf.php (as in the original) and it helped. Apparently the extension matters.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question