File Provider: command traefik error: field not found, node: http

I run traefik inside docker. I want to load dynamic configuration (for middleware) from a file provider.
However, I get this error message when starting the container:

command traefik error: field not found, node: http
# docker-compose.yml
volumes:
      - ${STACK_FOLDER}/letsencrypt:/letsencrypt
      - ${STACK_FOLDER}/traefik.yml:/traefik.yml:ro
      - ${STACK_FOLDER}/config.yml:/config/config.yml:ro
# config.yml
http:
  middlewares:
    to-https:
      redirectScheme:
        scheme: https
        permanent: true
# traefik.yml
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
    swarmMode: true
    network: traefik
    watch: true
  file:
    directory: /config
    watch: true

Please share you full Traefik static and dynamic config, and full docker-compose.yml.