I'm running into the following issue when running heroku local
:
[emerg] 595#0: "http" directive is duplicate in /usr/local/etc/nginx/nginx.conf:17
I've got heroku/heroku-buildpack-php": "*"
in my composer.json, and a fresh install of nginx (using brew install nginx
)
Could someone explain to me what could be happening?
So it seems the problem is related to the heroku.conf
generated by $root/vendor/heroku/heroku-buildpack-php/conf/nginx/heroku.conf.php
Heroku local
runs nginx with nginx: master process nginx -g daemon off; include $root/vendor/heroku/heroku-buildpack-php/conf/nginx/heroku.conf;
So both /usr/local/etc/nginx/nginx.conf
and heroku.conf
are loaded, hence the duplicate directive.
I've modified /usr/local/etc/nginx/nginx.conf
to only include
worker_processes 1;
events {
worker_connections 1024;
}
since without the events section nginx won't start, and left the rest to heroku.conf
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With