title: Traefik external services receiving 404 page not found
body: <p>I currently have Traefik installed in Docker alongside a few other docker containers. I am able to access those docker containers successfully, however, when I configure Traefik for any external services via the File Service, I receive the standard &quot;404 page not found&quot; error. I am able to successfully resolve these addresses directly, along with using Curl in terminal. Also, I have run the logs in DEBUG mode but I was not able to find any errors or 'smoking guns'. Also, the Traefik UI does not show any errors or possible problem areas.</p>
  <p>Heres my <strong>docker-compose.yml</strong></p>
  <pre><code>version: '3'
  
  services:
    traefik:
      image: traefik:v2.3
      container_name: traefik
      restart: unless-stopped
      security_opt:
        - no-new-privileges:true
      networks:
        - proxy
      ports:
        - 80:80
        - 443:443
      environment:
        - CF_API_EMAIL=******
        - CF_API_KEY=*****
      volumes:
        - /etc/localtime:/etc/localtime:ro
        - /var/run/docker.sock:/var/run/docker.sock:ro
        - ./data/traefik.yml:/traefik.yml:ro
        - ./data/acme.json:/acme.json
        - ./data/config.yml:/config.yml:ro
      labels:
        - &quot;traefik.enable=true&quot;
        - &quot;traefik.http.routers.traefik.entrypoints=http&quot;
        - &quot;traefik.http.routers.traefik.rule=Host(`monitor.example.com`)&quot;
        - &quot;traefik.http.middlewares.traefik-auth.basicauth.users=admin:****&quot;
        - &quot;traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https&quot;
        - &quot;traefik.http.routers.traefik.middlewares=traefik-https-redirect&quot;
        - &quot;traefik.http.routers.traefik-secure.entrypoints=https&quot;
        - &quot;traefik.http.routers.traefik-secure.rule=Host(`monitor.example`)&quot;
        - &quot;traefik.http.routers.traefik-secure.middlewares=traefik-auth&quot;
        - &quot;traefik.http.routers.traefik-secure.tls=true&quot;
        - &quot;traefik.http.routers.traefik-secure.tls.certresolver=cloudflare&quot;
        - &quot;traefik.http.routers.traefik-secure.tls.domains[0].main=example.com&quot;
        - &quot;traefik.http.routers.traefik-secure.tls.domains[0].sans=*.example.com&quot;
        - &quot;traefik.http.routers.traefik-secure.service=api@internal&quot;
  
  networks:
    proxy:
      external: true
  </code></pre>
  <p><strong>traefik.yml</strong></p>
  <pre><code>
  api:
    dashboard: true
    debug: true
  
  entryPoints:
    http:
      address: &quot;:80&quot;
    https:
      address: &quot;:443&quot;
  
  log:
      level: error
  
  providers:
    docker:
      endpoint: &quot;unix:///var/run/docker.sock&quot;
      exposedByDefault: false
    file:
      filename: /config.yml
  
  certificatesResolvers:
    cloudflare:
      acme:
        email: ******
        storage: acme.json
        dnsChallenge:
          provider: cloudflare
          resolvers:
            - &quot;1.1.1.1:53&quot;
            - &quot;1.0.0.1:53&quot;
  </code></pre>
  <p><strong>config.yml</strong></p>
  <pre><code>http:
    routers:
      weather:
        entryPoints:
          - &quot;https&quot;
        rule: &quot;Host(`example.com`)&quot;
        middlewares:
          - default-headers
  
        tls: {}
        service: weather
      
      synology:
        entryPoints:
          - &quot;https&quot;
        rule: &quot;Host(`nas.example.com`)&quot;
        middlewares:
          - default-headers
        tls: {}
        service: synology
        
    services:
      weather:
        loadBalancer:
          servers:
            - url: &quot;http://192.168.0.8:80&quot;
          passHostHeader: false
  
      synology:
        loadBalancer:
          servers:
            - url: &quot;https://192.168.0.3:5001&quot;
          passHostHeader: false
  
    middlewares:
   
      https-redirect:
        redirectScheme:
          scheme: https
  
      default-headers:
        headers:
          frameDeny: true
          sslRedirect: true
          browserXssFilter: true
          contentTypeNosniff: true
          forceSTSHeader: true
          stsIncludeSubdomains: true
          stsPreload: true
  
      default-whitelist:
        ipWhiteList:
          sourceRange:
          - &quot;10.0.0.0/24&quot;
          - &quot;192.168.0.0/24&quot;
          - &quot;172.0.0.0/8&quot;
  
      secured:
        chain:
          middlewares:
          - default-whitelist
          - default-headers
  </code></pre>
  <p>And here is the <strong>docker-compose.yml for Portainer</strong> that I am able to resolve successfully.</p>
  <pre><code>version: '3'
  
  services:
    portainer:
      image: portainer/portainer:latest
      container_name: portainer
      restart: unless-stopped
      security_opt:
        - no-new-privileges:true
      networks:
        - proxy
      volumes:
        - /etc/localtime:/etc/localtime:ro
        - /var/run/docker.sock:/var/run/docker.sock:ro
        - ./data:/data
      labels:
        - &quot;traefik.enable=true&quot;
        - &quot;traefik.http.routers.portainer.entrypoints=http&quot;
        - &quot;traefik.http.routers.portainer.rule=Host(`portainer.example.com`)&quot;
        - &quot;traefik.http.middlewares.portainer-https-redirect.redirectscheme.scheme=https&quot;
        - &quot;traefik.http.routers.portainer.middlewares=portainer-https-redirect&quot;
        - &quot;traefik.http.routers.portainer-secure.entrypoints=https&quot;
        - &quot;traefik.http.routers.portainer-secure.rule=Host(`portainer.example.com`)&quot;
        - &quot;traefik.http.routers.portainer-secure.tls=true&quot;
        - &quot;traefik.http.routers.portainer-secure.service=portainer&quot;
        - &quot;traefik.http.services.portainer.loadbalancer.server.port=9000&quot;
        - &quot;traefik.docker.network=proxy&quot;
  
  networks:
    proxy:
      external: true
  
  </code></pre>
  <p>I feel like this is a simple fix however I have been tearing my hair out trying to find a solution. Does anyone have any idea or suggestions on how I can troubleshoot this?</p>