Building nginx + php + docker environment for the first time, accessing localhost is a blank.

I installed images of nginx and php via docker

docker run --name dphp -v $PWD/php:/app php:7.0-fpm

docker run --name dngx -p 80:80 \
--link dphp:phpdomain \
-v $PWD/php-web-server.conf:/etc/nginx/nginx.conf \
--volumes-from dphp \
nginx
< hr >

after executing . / go.sh , use curl localhost to access. Both nginx and php receive requests, but why a blank is returned

Mar.23,2021

location ~\ .php? $

add a row

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

but why, I don't know

Menu