Multiple Nginx + PHP container Multiple Nginx + PHP container nginx nginx

Multiple Nginx + PHP container


In docker-compose the services are accessible by their name. Docker will resolve the IP address of the service automatically (you don't need to use IP addresses).

In your case, the name of the PHP service is php-dev and not just php.

The solution is to replace fastcgi_pass php:9000; with fastcgi_pass php-dev:9000;