some things come to my mind when reading your config-screenshots:
1 - Please check in traefik’s dashboard if your nginx-container is listed there as routers and services - otherwise traefik does not know where to forward the requests to. There is only one label for the NginX-container related to traefik. I would use at least four labels (copy & paste from one of my configs -
web is the name of my router/service for this container - and of course the value for the
rule will be different for you):
2 - You can also check with
docker-compose logs -f nginx if requests are processed by the nginx-container. If not the requests are not forwarded by traefik - so check why (and you are back at the previous point )
3 - Does the nginx-container know that it should forward requests for php-files to the php-container?
4 - You are mounting your project-folder to nginx-container’s
/var/www/html/but not to the php-container. So even if Nginx might get the request and knows that it should forward a request for
*.php to the php-container, the php-container does not have access to the php-file…
5 - I would not mount my project-folder a container - instead I would create a subfolder for the data (or use a data-volume) and mount this subfolder to the container. Usually the container does not need access to all of my project-files like
docker-compose.yml and so on.