# Http --\> https and https://server/web1 to docker https://web1.local:8443/

**URL:** <https://community.traefik.io/t/http-https-and-https-server-web1-to-docker-https-web1-local-8443/10615>\
**Category:** Traefik v2\
**Tags:** middleware, docker\
**Created:** [May 14, 2021, 9:43am UTC](https://community.traefik.io/t/http-https-and-https-server-web1-to-docker-https-web1-local-8443/10615 "2021-05-14T09:43:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zmiguelb](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/zmiguelb/32/3776_2.png) [@zmiguelb](https://community.traefik.io/u/zmiguelb)\
**Post date:** [May 14, 2021, 9:43am UTC](https://community.traefik.io/t/http-https-and-https-server-web1-to-docker-https-web1-local-8443/10615/1 "2021-05-14T09:43:57Z")

</div>

Hello @cakiwi,  
You have a very good topic on redirect and it think it is nearly the same problem as me.

Basically in my setup I have a server running podman (very similar do docker)  
The containers all exist in a private internal network and I have only exposed port 80 and 443 to the outside from traefik.

The issue I have is when i type "[https://server.domain/phabricator/](https://server.domain/phabricator/)" traefik picks it up but redirects to "[https://phabricator-app.dns.podman:8443/](https://phabricator-app.dns.podman:8443/)"  
However I just wanted it to do reverse proxy, it would fetch [https://phabricator-app.dns.podman:8443/](https://phabricator-app.dns.podman:8443/) which is only accesible from traefik and present it under [https://server.domain/phabricator/](https://server.domain/phabricator/)

I was wondering if you could help me understand what is wrong, i am not sure i am using the middlewares correctly.

Thanks

static conf (traefik.toml)

```auto
[entryPoints]
  [entryPoints.http]
    address = ":80"
  [entryPoints.http.forwardedHeaders]
    insecure = true
  [entryPoints.https]
[api]
  insecure = true
  dashboard = true

[providers]
  [providers.file]
    directory = "/etc/traefik/conf"
    watch = true

[entryPoints]
  # Standard HTTP
  [entryPoints.http]
    address = ":80"
  [entryPoints.http.forwardedHeaders]
    insecure = true
  # Standard HTTPS
  [entryPoints.https]
    address = ":443"

## To allow reverse proxy between ssl
[serversTransport]
  insecureSkipVerify = true

```

this is my dynamic conf

```auto
## Global redirect
[http.routers]
  [http.routers.redirecttohttps]
  ## Redirects everything to https
    entryPoints = ["http"]
    tls = true
    middlewares = ["httpsredirect"]
    rule = "HostRegexp(`{host:.+}`)"
    service = "noop"

  [http.routers.routephabricator]
    entryPoints = ["https"]
    tls = true
    rule = "PathPrefix(`/phabricator{regex:$$|/.*}`)"
    middlewares = ["redirectregex-phabricator"]
# middlewares = ["https-headers"]
    service = "phabricator-app"

[http.services]
  [http.services.phabricator-app.loadBalancer]
    [[http.services.phabricator-app.loadBalancer.servers]]
      url = "https://phabricator-app.dns.podman:8443/"

[http.middlewares]
  [http.middlewares.httpsredirect.redirectScheme]
    scheme = "https"
    permanent = true
  [http.middlewares.redirectregex-phabricator.redirectRegex]
    regex = ".*"
    replacement = "https://phabricator-app.dns.podman:8443/"
    permanent = true

[tls.stores]
  [tls.stores.default]
    [tls.stores.default.defaultCertificate]
      certFile = "/etc/traefik/cert.crt"
      keyFile = "/etc/traefik/priv.key"

```
