title: Traefik: Simple Letsencrypt HTTPS redirect to whoami service throws "404 page not found"
body: <p>I've tried to get this up and running for two days now and some simple HTTP -> HTTPs redirect does not work! :(</p>
  
  <p>Pretty simple use case:</p>
  
  <p>whoami.my-example-domain.com:80 => redirect to whoami.my-example-domain.com:443 and then traefik internally redirects to :80 of my whoami service docker container.</p>
  
  <p>Here's the docker-compose.yml</p>
  
  <pre><code>version: "3"
  services:
    reverse-proxy:
  image: traefik:alpine
  command:
    - --logLevel=WARN
    - --defaultentrypoints=http,https
    - --entrypoints=Name:http Address::80 Redirect.EntryPoint:https
    - --entrypoints=Name:https Address::443 TLS
    - --acme
    - --acme.email=myemail@gmail.com
    - --acme.storage=acme.json
    - --acme.entryPoint=https
    - --acme.httpChallenge.entryPoint=http
    - --acme.OnHostRule=true
    - --acme.onDemand=false
    - --acme.acmeLogging=true
    - --docker
    - --docker.watch
    - --docker.exposedbydefault=false
    - --docker.domain=docker.localhost
  restart: always
  networks:
    - web
  ports:
    - "80:80"     # The HTTP port
    - "443:443"   # The HTTPS port
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events
    - /opt/data/traefik/acme.json:/acme.json
    whoami:
  image: containous/whoami  # A container that exposes an API to show its IP address
  labels:
    - "traefik.enable=true"
    - "traefik.frontend.rule=Host:whoami.some-example-domain.com"
    - "traefik.port=80"
    - "traefik.frontend.entryPoints=http"
  networks:
    web:
      external: true
  </code></pre>
  
  <p>When I now call <a href="http://whoami.some-example-domain.com" rel="nofollow noreferrer">http://whoami.some-example-domain.com</a> (this is just a demo domain and won't work) => it redirects to HTTPs... which is cool, but then it throws the famous "404 page not found" traefik standard error.</p>
  
  <p>If already tried to set the following labels to the container:</p>
  
  <blockquote>
    <ul>
    <li>"traefik.port=80"</li>
    <li>"traefik.frontend.entryPoints=http"</li>
    </ul>
  </blockquote>
  
  <p>That didn't work either.</p>
  
  <p>Any help would be appreciated! Thanks in advance!</p>
  
  <p>Regards,</p>
  
  <p>Sascha</p>