Docker w/ PHP-FPM & Nginx - 502 Bad Gateway

Solution 1:

Solved, turns out I needed to change the php location to.

    location ~ \.php$ {
        fastcgi_split_path_info  ^(.+\.php)(/.+)$;
        fastcgi_index            index.php;
        fastcgi_pass             app:9000;
        include                  fastcgi_params;
        fastcgi_param   PATH_INFO       $fastcgi_path_info;
        fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }