Hi,
I'm probably being stupid or it's something simple, but I digress.
I'm running Traefik v3.1 with Docker Compose as shown below:
services:
traefik:
image: traefik:v3.1
container_name: traefik-test
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- web
test_site:
image: nginx:alpine
container_name: test-site-traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.test.rule=Host(`docker_testing.MYDOMAIN.co.uk`)"
- "traefik.http.routers.test.entrypoints=web"
- "traefik.http.routers.test.priority=10"
networks:
- web
networks:
web:
driver: bridge
The domain docker_testing.MYDOMAIN.co.uk correctly resolves to my VM’s IP.
Inside Traefik’s container, I can access the test container (e.g., using curl http://test_site:80) and get the expected Nginx page. However, externally, when I visit http://docker_testing.MYDOMAIN.co.uk, I receive a 404 error.
Traefik’s dashboard (http://<VM_IP>:8080) shows the router with the correct rule.
I'm not sure if it's relevant, but the DNS records for this VM and for the docker_testing.MYDOMAIN.co.uk are sitting on an internal Windows DNS server.
Any ideas on what might be causing the external 404? Thanks!