aws-fargate-with-php icon indicating copy to clipboard operation
aws-fargate-with-php copied to clipboard

502 Bad Gateway when running locally

Open jeffski opened this issue 5 years ago • 2 comments

I cloned the project, copied Laravel files in to it (fresh install) and ran:

docker-compose up -d

When I visit http://localhost I get a 502 Bad Gateway error message in the browser.

The docker log command docker logs aws-fargate-with-php_nginx_1 gives the following output:

192.168.80.1 - - [09/Jun/2020:07:43:31 +0000] "GET / HTTP/1.1" 502 158 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0" "-"
2020/06/09 07:43:31 [error] 11#11: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.80.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "localhost"

Any ideas?

jeffski avatar Jun 09 '20 07:06 jeffski

I read the other issue #1 - when I change fastcgi_pass 127.0.0.1:9000; to fastcgi_pass php-fpm:9000; it works for local dev.

jeffski avatar Jun 09 '20 07:06 jeffski

I have same problem too :(

Gigiart avatar Jul 10 '20 11:07 Gigiart