Reverse proxy to external host

version: "3.7"

services:
  traefik:
    image: traefik:v2.1.1
    command: >
      --log.level=INFO
      --api
      --providers.docker.exposedbydefault=false
      --providers.file.directory=/dynamic/
      --entrypoints.web.address=:80
      --entrypoints.websecure.address=:443
    ports:
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./dynamic/:/dynamic/
    labels:
      # enable this service
      traefik.enable: true

      # dashboard
      traefik.http.routers.api.rule: Host(`traefik.localhost`)
      traefik.http.routers.api.entrypoints: web
      traefik.http.routers.api.service: api@internal

./dynamic/mytraefikhost.yml

http:
  routers:
    foobar:
      entryPoints:
      - websecure
      middlewares:
      - strip
      service: myexthost
      rule: Host(`dev.mytraefikhost.de`) && Path(`/myexthost/www`)
      tls: {}

  myexthost:
    foobar:
      loadBalancer:
        servers:
        - url: https://www.myexthost.de
 
  middlewares:
    strip:
      stripPrefix:
        prefixes:
        - /myexthost/www