404 page not found after docker-compose start on Windows 10

Hello! I have a PHP Symfony project with several containers. The project works fine on Linux.

But, when I take the same project and the same configuration on Windows 10 I get the following issue.

After starting the containers with : docker-compose start (or : docker-compose up -d) , when I go to the URL : http://application.local , I get just an empty page with message : 404 page not found .

If I go to : http://application.local:8080 ===> I get the traefik dashboard as expected.

So something wrong happens obviosly on port 80 (there is no other server running on it).

Again, the same project works fine on Linux.

Can someone explain what I should do to make it work on Windows 10 ?

Thanks

Hello,
as you have a traefik-dashboard on port 8080 it and have a 404-error-page on port 80 (the default-port traefik is listeing to for http) it seems that traefik does not know where to route your request to.
So please check in traefik’s dashboard if your Symphony-related containers (to be exact: the one that is serving http-requests) are listed at HTTP-routers and HTTP-services.
Using linux-containers on a Win10 I had to use this volumes-line in traefik’s docker-compose.yml:
- /var/run/docker.sock:/var/run/docker.sock
so that traefik can get knowledge about other containers and their labels.
Best regards
Matthias

Hi Matthias!
thank you a lot, you saved me! :slight_smile:
It works now!

So in docker-compose.yml file, in traefik’s volumes section, I replaced the line that I had initially :

  • /run/docker.sock:/var/run/docker.sock:ro

by the one you gave me:

  • /var/run/docker.sock:/var/run/docker.sock

After I executed : docker-compose up -d : I finally got my login page !

So, by the way : is this going to work on Linux too ?

And what is wrong, on Windows, with the initial code ?

P.S. These are bonus questions, only if you have time to answer. Thanks a lot again!
Best Regards,
Marko

Hello Marko,

happy that it helped :slight_smile:

About your questions:
a) Yes - I have the same directory /var/run/docker.sock mounted to traefik’s docker-container on linux (ubuntu and debian), too.
b) Seems that the linux-VM used by Docker on Windows does only use /var/run whereas most linux-distributions use both (/run and /var/run) - see linux - Difference between /run and /var/run - Unix & Linux Stack Exchange

Best regards
Matthias