# Reverse proxy from HTTPs to HTTP by assigned port

**URL:** <https://community.traefik.io/t/reverse-proxy-from-https-to-http-by-assigned-port/27018>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [March 27, 2025, 10:55am UTC](https://community.traefik.io/t/reverse-proxy-from-https-to-http-by-assigned-port/27018 "2025-03-27T10:55:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Androyed](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Androyed](https://community.traefik.io/u/Androyed)\
**Post date:** [March 27, 2025, 10:55am UTC](https://community.traefik.io/t/reverse-proxy-from-https-to-http-by-assigned-port/27018/1 "2025-03-27T10:55:34Z")

</div>

Hi,

Can someone please help me with Traefik configuration, I'm stuck when redirected to the given application.

What I want:

I need TRAEFIK to redirect from [https://my.domain.com](https://my.domain.com) **/wing**

to an FTP server under e.g. **"[http://host.docker.internal:8220](http://host.docker.internal:8220)**" which runs as a windows service

the service itself at "[http://host.docker.internal:8220](http://host.docker.internal:8220)" runs fine

but when I want to access via HTTPS it says 404 page not found

here is the config=

docker-compose.yml

```auto
services:
  traefik:
    image: traefik:v2.9
    container_name: traefik
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "/run/desktop/mnt/host/j/Cloud-vlastni_file_server/Traefik-Reverse-Proxy/traefik.yaml:/etc/traefik/traefik.yaml"
      - "/run/desktop/mnt/host/j/Cloud-vlastni_file_server/Traefik-Reverse-Proxy/data:/data"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

```

traefik.yaml

```auto
log:
  level: debug

entryPoints:
  websecure:
    address: ":443"

providers:
  docker:
    exposedByDefault: false

certificatesResolvers:
  myresolver:
    acme:
      email: "N/A"
      storage: "/data/acme.json"
      tlsChallenge: {}

http:
  routers:    
wing:
      rule: "Host(`my.domain.com`) && PathPrefix(`/wing`)"
      entryPoints:
        - websecure
      service: wingftp
      tls:
        certResolver: myresolver
      middlewares:
        - replace-wing-path

  middlewares:
    replace-wing-path:
      replacePath:
        path: "/"

  services:
    wingftp:
      loadBalancer:
        servers:
          - url: "http://host.docker.internal:8220"

```

Thanks

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [March 27, 2025, 11:34am UTC](https://community.traefik.io/t/reverse-proxy-from-https-to-http-by-assigned-port/27018/2 "2025-03-27T11:34:50Z")

</div>

`http` as root element is Traefik dynamic config and needs to go into a separate file, loaded by `providers.file` in static config.

---

<div class="post-metadata">

**Author:** ![Androyed](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Androyed](https://community.traefik.io/u/Androyed)\
**Post date:** [March 27, 2025, 3:26pm UTC](https://community.traefik.io/t/reverse-proxy-from-https-to-http-by-assigned-port/27018/3 "2025-03-27T15:26:25Z")

</div>

thanks, I've moved a bit, now I'll move it from [https://my.domain.com/](https://my.domain.com/) **wing** to [https://my.domain.com/](https://my.domain.com/) **login.html** and then I'll get a 404 page not found = is it a problem in the wingFTP SW itself or is there still a need to set something in traffic? thanks a lot

it looks like for **/** failed to redirect?
