Why can’t ngnix or docker see the index.php file?

  docker, drupal, nginx, php

I created my project folder in Ubuntu at: /home/my_username/Projects/drupal9doc1
And put in this folder: Docker-based Drupal stack
Configured the docker-compose.yml and .env files and then wrote the command in the terminal: docker-compose up -d
running the necessary images for the local rise of the Drupal site.

I created index.php files with phpinfo() function in my project folder to test how everything works.
I wrote in the url http://drupal9doc1.localhost:8000
And File not found is displayed on my page page instead of the php version.

Part of the code in the docker-compose.yml file

Part of the code in the .env file

Do you have any suggestions as to why the index.php file for a nginx / docker is not visible?
If you need more information, write me in the comments.

Source: Docker Questions

LEAVE A COMMENT