# On Port 443, route to port 8080 in docker container (host mode)

**URL:** <https://community.traefik.io/t/on-port-443-route-to-port-8080-in-docker-container-host-mode/5440>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [April 11, 2020, 7:21pm UTC](https://community.traefik.io/t/on-port-443-route-to-port-8080-in-docker-container-host-mode/5440 "2020-04-11T19:21:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![J7mbo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/j7mbo/32/1841_2.png) [@J7mbo](https://community.traefik.io/u/J7mbo)\
**Post date:** [April 11, 2020, 7:21pm UTC](https://community.traefik.io/t/on-port-443-route-to-port-8080-in-docker-container-host-mode/5440/1 "2020-04-11T19:21:51Z")

</div>

I want to go to **[https://app.mydomain.com](https://app.mydomain.com)** in the browser and be redirected to a docker container running on :8080, on **http**. The docker container is running in network host mode. So `curl localhost:8080` works.

My problem is, **I still have to put the port :8080 in the browser, otherwise I get a 404**. My second problem is, **https** doesn't work either! Visiting [http://app.mydomain.com:8080](http://app.mydomain.com:8080) works!

I want to be typing in `https://app.mydomain.com` and it'll take me to `http://app.mydomain.com:8080` (even better if the port wasn't displayed but guess I can't do anything about that right??).

Routers:

```auto
http:
    # So I should be able to use http-redirect for https -> http
    middlewares:
        http-redirect:
            redirectScheme:
                scheme: http
                permanent: true
    routers:
        rule: "Host(`app.mydomain.com`)"
        entryPoints: [web,websecure]
        middlewares: [http-redirect]
        service: app
        tls:
            certResolver: letsencrypt

```

Services:

```auto
dns:
    loadBalancer:
        servers:
            - url: "http://localhost:8080"

```

What am I missing? I must be close...

---

<div class="post-metadata">

**Author:** ![J7mbo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/j7mbo/32/1841_2.png) [@J7mbo](https://community.traefik.io/u/J7mbo)\
**Post date:** [April 11, 2020, 7:27pm UTC](https://community.traefik.io/t/on-port-443-route-to-port-8080-in-docker-container-host-mode/5440/2 "2020-04-11T19:27:14Z")

</div>

Solved it. You can specify the redirect port in the middleware.
