Proxy to external server by PathPrefix

Please help to understand something I seem not to understand correctly.
I want to send any requests to wordpress (regardless of Host) to a single wordpress server.
I've worked through several docs and composed this set of labels:

        - traefik.http.routers.wordpress-http.rule=PathPrefix(`/wp-`)
        - traefik.http.routers.wordpress-http.service=wordpress
        - traefik.http.routers.wordpress-http.entrypoints=http
        - traefik.http.routers.wordpress-http.middlewares=https-redirect
        - traefik.http.routers.wordpress-https.rule=PathPrefix(`/wp-`)
        - traefik.http.routers.wordpress-https.service=wordpress
        - traefik.http.routers.wordpress-https.entrypoints=https
        - traefik.http.routers.wordpress-https.tls=true
        - traefik.http.routers.wordpress-https.certresolver=le
        - traefik.http.services.wordpress.loadbalancer.servers.url=http://192.168.1.31:8001

When I try to apply this setup, it fails all the rest labels that worked before (bringing all setup to 404 state).

My question is that there is definitely disagreement between two 'official' docs for Traefik:

  1. First one is this - Services - Traefik
    It encourages usage of servers.url inside service spec for upstream specification/
  2. Second one - ultimate list of all possible labels - Docker - Traefik (it is also confirmed in Docker - Traefik)

It provides only three options:

 - "traefik.http.services.service01.loadbalancer.server.port=foobar"
  - "traefik.http.services.service01.loadbalancer.server.scheme=foobar"
  - "traefik.http.services.service01.loadbalancer.serverstransport=foobar"

for HTTP service server setup, and no servers at all...

I assume the latter one is correct and the former is not. so my question is - how to set up the needed proxy correctly?

You'll have to use a file or KV provider to do a service external to the docker/swarm provider.

The docker prvider in swarm mode assume the services containers are the endpoints and use a service label like:

traefik.http.services.wordpress.loadbalancer.server.port: 8081

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.