Configuring WSO2 API Manager to Work With Traefik for HTTPS

  docker, traefik, wso2, wso2-am

I am trying to configure Traefik and WSO2 API Manager. Basically, I want to configure Traefik to handle https.

     labels:
        - "traefik.enable=true"
        - "traefik.http.middlewares.service-am-https.redirectscheme.scheme=https"
        - "traefik.http.routers.service-am-http.entrypoints=web"
        - "traefik.http.routers.service-am-http.rule=Host(`xx.xx.xx`) && Path(`/apim/admin`)"
        - "tr[email protected]docker"
        - "traefik.http.routers.service-am.tls=true"
        - "traefik.http.routers.service-am.rule=Host(`xx.xx.xx`) && Path(`/apim/admin`)"
        - "traefik.http.routers.service-am.entrypoints=web-secure"
        - "traefik.http.services.service-am.loadbalancer.server.port=9443"

I also included this in the deployment.toml file for API Manager.

[catalina.valves.valve.properties]
className = "org.apache.catalina.valves.RemoteIpValve"
internalProxies = "*"
remoteIpHeader ="x-forwarded-for"
proxiesHeader="x-forwarded-by"
trustedProxies="*"

When I try to access the service, https://xx.xx.xx/apim/admin, I get this error:

Bad Request
This combination of host and port requires TLS.

Traefik is successfully handling the https part but when it comes to WSO2 API Manager, this issue comes up. Any ideas on how to resolve this?

Source: Docker Questions

LEAVE A COMMENT