I will setup a very simple php page with docker and nginx.
Source files can be found here:

1. Create a project folder setup:

In "php" folder I will create index.php file that executes phpinfo().

2. Create nginx config site.conf in "docker" folder:

fastcgi_pass php:9000;
- this is what tells nginx how to connect to php container

3. Edit /etc/hosts file on host machine, and add a record:

127.0.0.1       myapp.loc

4. Create docker-compose.yml file in "docker" folder:

Here I do several things:

5. Go to /var/www/docker-study.loc/recipe-02/docker/ and execute:

docker-compose up -d
If I now try
myapp.loc/
in browser, I will see php info results.