Trying to connect multiple app to one domain

Hey, i have a traefik in docker compose wich is like this:

services:
  reverse-proxy:
    image: traefik:v3.2
    container_name: reverse-proxy
    command:
      # - "--log.level=DEBUG"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.postgres.address=:5500"
      - "--certificatesresolvers.myresolver.acme.tlschallenge=true"
      - "--certificatesresolvers.myresolver.acme.email="
      - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
      - "--accesslog=true"   # Active les logs d'accès HTTP
      - "--providers.file.directory=/etc/config_tls/"
      - "--providers.file.watch=true"
      
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./letsencrypt:/letsencrypt
      - ./tls:/etc/config_tls/
    ports:
      - "80:80"
      - "443:443"
      - "5500:5500"
    networks:
      - my-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
      - "traefik.http.routers.http-catchall.rule=HostRegexp(`{host:.+}`)"
      - "traefik.http.routers.http-catchall.entrypoints=web"
      - "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
networks:
  my-network:
    name: my-network
    driver: bridge

I have another docker compose for another app B:

services:
  # ----------------- ORS application configuration ------------------- #
  ors-app:
    # Activate the following lines to build the container from the repository
    # You have to add --build to the docker compose command to do so
    build:
      context: ./
    container_name: ors-app
    ports:
      - "8082:8082"  # Expose the ORS API on port 8080
      - "9001:9001"  # Expose additional port for monitoring (optional)
    image: openrouteservice/openrouteservice:v9.0.0
    # Advanced option! If you different ids to 0:0 and 1000:1000, you have to rebuild the container with the build args UID,GID.
    # The user command is useful if you want easier bind mount access or better security.
    user: "1000:1000" # Run "mkdir -p ors-docker/config ors-docker/elevation_cache ors-docker/files ors-docker/graphs ors-docker/logs && sudo chown -R 1000:1000 ors" before starting the container!
    volumes:  # Mount relative directories. ONLY for local container runtime. To switch to docker managed volumes see 'Docker Volumes configuration' section below.
      - ./ors-docker:/home/ors  # Mount the ORS application directory (for logs, graphs, elevation_cache, etc.) into its own directory
      #- ./graphs:/home/ors/graphs  # Mount graphs directory individually
      #- ./elevation_cache:/home/ors/elevation_cache  # Mount elevation cache directory individually
      - ./ors-docker/config:/home/ors/config  # Mount configuration directory individually
      #- ./logs:/home/ors/logs  # Mount logs directory individually
      #- ./files:/home/ors/files  # Mount files directory individually

    networks:
      - my-network

    labels:
        - "traefik.enable=true"
        # Routers 
        - "traefik.http.routers.ors.rule=Host(`maindomain`) && PathPrefix(`/ors`)"
        - "traefik.http.routers.ors.service=ors"
        - "traefik.http.routers.ors.entrypoints=websecure"
        - "traefik.http.routers.ors.middlewares=test-redirectscheme,ors-stripprefix"
        - "traefik.http.routers.ors.tls.certresolver=myresolver"
        # Services
        - "traefik.http.services.ors.loadbalancer.server.port=8082"
        # Middleware
        - "traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https"
        - "traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent=true" 
        - "traefik.http.middlewares.ors-stripprefix.stripprefix.prefixes=/ors"
        - "traefik.http.middlewares.ors-stripprefix.stripprefix.forceslash=true"
        
networks:
  my-network:
    external: true

I would like to connect to this application with mainDomain/ors but i always get 404 error.
What am i doing wrong here ?

Thanks !

The config seems not very well maintained.

The target service ORM router has a http-to-https redirect assigned, which will never be triggered, as router is only using websecure entrypoint.

In general I recommend to set redirect and TLS directly on entrypoint, then you don’t have to repeat on every router. Compare to simple Traefik example.

Target service is publishing ports, which is not needed when using a Docker network, this way Traefik security middlewares might be circumvented.

You have specified a build context and an image, which one should be used?

When ORS is a GUI web application, you should probably not use stripPrefix, unless some kind of base path can be set in the app.


Moving forward:

Enable and check Traefik debug log, are the target service labels recognized?

Enable and check Traefik access log in JSON format, is error coming from target service (OriginStatus) or only from Traefik (DownstreamStatus).

Hey, thanks for your help !
ORS is an api application not a web application.
I did what you said (remove the publishing port part) and that is the output logs:

{"level":"info","version":"3.2.3","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/cmd/traefik/traefik.go:103","message":"Traefik version 3.2.3 built on 2024-12-16T10:31:50Z"}

{"level":"debug","staticConfiguration":{"global":{"checkNewVersion":true},"serversTransport":{"maxIdleConnsPerHost":200},"tcpServersTransport":{"dialKeepAlive":"15s","dialTimeout":"30s"},"entryPoints":{"postgres":{"address":":5500","transport":{"lifeCycle":{"graceTimeOut":"10s"},"respondingTimeouts":{"readTimeout":"1m0s","idleTimeout":"3m0s"}},"forwardedHeaders":{},"http":{"maxHeaderBytes":1048576},"http2":{"maxConcurrentStreams":250},"udp":{"timeout":"3s"}},"web":{"address":":80","transport":{"lifeCycle":{"graceTimeOut":"10s"},"respondingTimeouts":{"readTimeout":"1m0s","idleTimeout":"3m0s"}},"forwardedHeaders":{},"http":{"maxHeaderBytes":1048576},"http2":{"maxConcurrentStreams":250},"udp":{"timeout":"3s"}},"websecure":{"address":":443","transport":{"lifeCycle":{"graceTimeOut":"10s"},"respondingTimeouts":{"readTimeout":"1m0s","idleTimeout":"3m0s"}},"forwardedHeaders":{},"http":{"maxHeaderBytes":1048576},"http2":{"maxConcurrentStreams":250},"udp":{"timeout":"3s"}}},"providers":{"providersThrottleDuration":"2s","docker":{"watch":true,"defaultRule":"Host(`{{ normalize .Name }}`)","endpoint":"unix:///var/run/docker.sock"},"file":{"directory":"/etc/config_tls/","watch":true}},"log":{"level":"DEBUG","format":"json","filePath":"/logs/traefik.log"},"accessLog":{"format":"common","filters":{},"fields":{"defaultMode":"keep","headers":{"defaultMode":"drop"}}},"certificatesResolvers":{"myresolver":{"acme":{"email":"nicolas.delory@galileo.energy","caServer":"https://acme-v02.api.letsencrypt.org/directory","storage":"/letsencrypt/acme.json","keyType":"RSA4096","certificatesDuration":2160,"tlsChallenge":{}}}}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/cmd/traefik/traefik.go:110","message":"Static configuration loaded [json]"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/cmd/traefik/traefik.go:626","message":"\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://doc.traefik.io/traefik/contributing/data-collection/\n"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:73","message":"Starting provider aggregator *aggregator.ProviderAggregator"}

{"level":"debug","entryPointName":"web","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/server_entrypoint_tcp.go:231","message":"Starting TCP Server"}

{"level":"debug","entryPointName":"websecure","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/server_entrypoint_tcp.go:231","message":"Starting TCP Server"}

{"level":"debug","entryPointName":"postgres","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/server_entrypoint_tcp.go:231","message":"Starting TCP Server"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *file.Provider"}

{"level":"debug","config":{"directory":"/etc/config_tls/","watch":true},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*file.Provider provider configuration"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/file/file.go:122","message":"add watcher on: /etc/config_tls/"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/file/file.go:122","message":"add watcher on: /etc/config_tls/traefik-dynamic.toml"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *traefik.Provider"}

{"level":"debug","config":{},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*traefik.Provider provider configuration"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *docker.Provider"}

{"level":"debug","config":{"watch":true,"defaultRule":"Host(`{{ normalize .Name }}`)","endpoint":"unix:///var/run/docker.sock"},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*docker.Provider provider configuration"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *acme.ChallengeTLSALPN"}

{"level":"debug","config":{},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*acme.ChallengeTLSALPN provider configuration"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *acme.Provider"}

{"level":"debug","config":{"email":"nicolas.delory@galileo.energy","caServer":"https://acme-v02.api.letsencrypt.org/directory","storage":"/letsencrypt/acme.json","keyType":"RSA4096","certificatesDuration":2160,"tlsChallenge":{},"ResolverName":"myresolver","store":{},"TLSChallengeProvider":{},"HTTPChallengeProvider":{}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*acme.Provider provider configuration"}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:221","message":"Attempt to renew certificates \"720h0m0s\" before expiry and check every \"24h0m0s\""}

{"level":"info","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:859","message":"Testing certificate renew..."}

{"level":"debug","providerName":"file","config":{"http":{},"tcp":{},"udp":{},"tls":{"options":{"default":{"cipherSuites":["TLS_AES_128_GCM_SHA256","TLS_AES_256_GCM_SHA384","TLS_CHACHA20_POLY1305_SHA256","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256","TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"],"clientAuth":{},"alpnProtocols":["http/1.1","h2","acme-tls/1","postgresql"]}}}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","providerName":"internal","config":{"http":{"services":{"noop":{}},"serversTransports":{"default":{"maxIdleConnsPerHost":200}}},"tcp":{"serversTransports":{"default":{"dialKeepAlive":"15s","dialTimeout":"30s"}}},"udp":{},"tls":{}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","providerName":"myresolver.acme","config":{"http":{},"tcp":{},"udp":{},"tls":{}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) gis-data.westeurope.cloudapp.azure.com"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) lizmap.galileo.energy"}

{"level":"debug","providerName":"docker","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/pdocker.go:90","message":"Provider connection established with docker 27.3.1 (API 1.47)"}

{"level":"debug","providerName":"docker","config":{"http":{"routers":{"http-catchall":{"entryPoints":["web"],"middlewares":["redirect-to-https"],"service":"reverse-proxy-network","rule":"HostRegexp(`{host:.+}`)"}},"services":{"reverse-proxy-network":{"loadBalancer":{"servers":[{"url":"http://172.18.0.2:80"}],"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"}}}},"middlewares":{"redirect-to-https":{"redirectScheme":{"scheme":"https"}}}},"tcp":{},"udp":{},"tls":{}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","tlsStoreName":"default","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:321","message":"No default certificate, fallback to the internal generated certificate"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) gis-data.westeurope.cloudapp.azure.com"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) lizmap.galileo.energy"}

{"level":"debug","tlsStoreName":"default","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:321","message":"No default certificate, fallback to the internal generated certificate"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","serviceName":"reverse-proxy-network@docker","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:318","message":"Creating load-balancer"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","serviceName":"reverse-proxy-network@docker","serverName":"b9597fe0f5ca1856","target":"http://172.18.0.2:80","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:355","message":"Creating server"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","middlewareName":"redirect-to-https@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:29","message":"Creating middleware"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","middlewareName":"redirect-to-https@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:30","message":"Setting up redirection to https "}

{"level":"debug","entryPointName":"web","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:25","message":"Creating middleware"}

{"level":"debug","providerName":"docker","time":"2024-12-23T09:45:09Z","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/pdocker.go:112","message":"Provider event received {Status:start ID:5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f From:openrouteservice/openrouteservice:v9.0.0 Type:container Action:start Actor:{ID:5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f Attributes:map[com.docker.compose.config-hash:9ab6f17c83394446d8291607364caead2fce1dda6d9222d92a693d8d1bfb8222 com.docker.compose.container-number:1 com.docker.compose.depends_on: com.docker.compose.image:sha256:207c211752323d657369ca07cf2cb2d67d789583ffc1749ccae02e2d82e3c744 com.docker.compose.oneoff:False com.docker.compose.project:ors com.docker.compose.project.config_files:/home/azureuser/docker/ors/docker-compose.yml com.docker.compose.project.working_dir:/home/azureuser/docker/ors com.docker.compose.service:ors-app com.docker.compose.version:2.29.7 image:openrouteservice/openrouteservice:v9.0.0 name:ors-app traefik.enable:true traefik.http.middlewares.ors-stripprefix.stripprefix.forceslash:true traefik.http.middlewares.ors-stripprefix.stripprefix.prefixes:/ors traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent:true traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme:https traefik.http.routers.ors.entrypoints:websecure traefik.http.routers.ors.middlewares:test-redirectscheme,ors-stripprefix traefik.http.routers.ors.rule:Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`) traefik.http.routers.ors.service:ors traefik.http.routers.ors.tls.certresolver:myresolver traefik.http.services.ors.loadbalancer.server.port:8082]} Scope:local Time:1734947109 TimeNano:1734947109706907644}"}

{"level":"debug","providerName":"docker","providerName":"docker","container":"ors-app-ors-5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f","time":"2024-12-23T09:45:09Z","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/config.go:200","message":"Filtering unhealthy or starting container"}

{"level":"debug","providerName":"docker","config":{"http":{"routers":{"http-catchall":{"entryPoints":["web"],"middlewares":["redirect-to-https"],"service":"reverse-proxy-network","rule":"HostRegexp(`{host:.+}`)"}},"services":{"reverse-proxy-network":{"loadBalancer":{"servers":[{"url":"http://172.18.0.2:80"}],"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"}}}},"middlewares":{"redirect-to-https":{"redirectScheme":{"scheme":"https"}}}},"tcp":{},"udp":{},"tls":{}},"time":"2024-12-23T09:45:09Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","providerName":"docker","time":"2024-12-23T09:45:09Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:127","message":"Skipping unchanged configuration"}

{"level":"debug","providerName":"docker","time":"2024-12-23T09:45:15Z","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/pdocker.go:112","message":"Provider event received {Status:health_status: healthy ID:5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f From:openrouteservice/openrouteservice:v9.0.0 Type:container Action:health_status: healthy Actor:{ID:5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f Attributes:map[com.docker.compose.config-hash:9ab6f17c83394446d8291607364caead2fce1dda6d9222d92a693d8d1bfb8222 com.docker.compose.container-number:1 com.docker.compose.depends_on: com.docker.compose.image:sha256:207c211752323d657369ca07cf2cb2d67d789583ffc1749ccae02e2d82e3c744 com.docker.compose.oneoff:False com.docker.compose.project:ors com.docker.compose.project.config_files:/home/azureuser/docker/ors/docker-compose.yml com.docker.compose.project.working_dir:/home/azureuser/docker/ors com.docker.compose.service:ors-app com.docker.compose.version:2.29.7 image:openrouteservice/openrouteservice:v9.0.0 name:ors-app traefik.enable:true traefik.http.middlewares.ors-stripprefix.stripprefix.forceslash:true traefik.http.middlewares.ors-stripprefix.stripprefix.prefixes:/ors traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent:true traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme:https traefik.http.routers.ors.entrypoints:websecure traefik.http.routers.ors.middlewares:test-redirectscheme,ors-stripprefix traefik.http.routers.ors.rule:Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`) traefik.http.routers.ors.service:ors traefik.http.routers.ors.tls.certresolver:myresolver traefik.http.services.ors.loadbalancer.server.port:8082]} Scope:local Time:1734947115 TimeNano:1734947115949087836}"}

{"level":"debug","providerName":"docker","config":{"http":{"routers":{"http-catchall":{"entryPoints":["web"],"middlewares":["redirect-to-https"],"service":"reverse-proxy-network","rule":"HostRegexp(`{host:.+}`)"},"ors":{"entryPoints":["websecure"],"middlewares":["test-redirectscheme","ors-stripprefix"],"service":"ors","rule":"Host(`lizmap.galileo.energy`) \u0026\u0026 PathPrefix(`/ors`)","tls":{"certResolver":"myresolver"}}},"services":{"ors":{"loadBalancer":{"servers":[{"url":"http://172.18.0.3:8082"}],"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"}}},"reverse-proxy-network":{"loadBalancer":{"servers":[{"url":"http://172.18.0.2:80"}],"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"}}}},"middlewares":{"ors-stripprefix":{"stripPrefix":{"prefixes":["/ors"],"forceSlash":true}},"redirect-to-https":{"redirectScheme":{"scheme":"https"}},"test-redirectscheme":{"redirectScheme":{"scheme":"https","permanent":true}}}},"tcp":{},"udp":{},"tls":{}},"time":"2024-12-23T09:45:15Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","time":"2024-12-23T09:45:15Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) gis-data.westeurope.cloudapp.azure.com"}

{"level":"debug","time":"2024-12-23T09:45:15Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) lizmap.galileo.energy"}

{"level":"debug","tlsStoreName":"default","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:321","message":"No default certificate, fallback to the internal generated certificate"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","serviceName":"reverse-proxy-network@docker","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:318","message":"Creating load-balancer"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","serviceName":"reverse-proxy-network@docker","serverName":"b9597fe0f5ca1856","target":"http://172.18.0.2:80","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:355","message":"Creating server"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","middlewareName":"redirect-to-https@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:29","message":"Creating middleware"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","middlewareName":"redirect-to-https@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:30","message":"Setting up redirection to https "}

{"level":"debug","entryPointName":"web","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:25","message":"Creating middleware"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","serviceName":"ors@docker","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:318","message":"Creating load-balancer"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","serviceName":"ors@docker","serverName":"446123679e5606b1","target":"http://172.18.0.3:8082","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:355","message":"Creating server"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","middlewareType":"StripPrefix","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/stripprefix/strip_prefix.go:32","message":"Creating middleware"}

{"level":"warn","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","middlewareType":"StripPrefix","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/stripprefix/strip_prefix.go:35","message":"`ForceSlash` option is deprecated, please remove any usage of this option."}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/observability/middleware.go:33","message":"Adding tracing to middleware"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"test-redirectscheme@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:29","message":"Creating middleware"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"test-redirectscheme@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:30","message":"Setting up redirection to https "}

{"level":"debug","entryPointName":"websecure","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:25","message":"Creating middleware"}

{"level":"debug","entryPointName":"websecure","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/router/tcp/manager.go:237","message":"Adding route for lizmap.galileo.energy with TLS options default"}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:445","message":"Trying to challenge certificate for domain [lizmap.galileo.energy] found in HostSNI rule"}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:915","message":"Looking for provided certificate(s) to validate [\"lizmap.galileo.energy\"]..."}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","domains":["lizmap.galileo.energy"],"time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:959","message":"No ACME certificate generation required for domains"}

{"level":"debug","time":"2024-12-23T09:45:35Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/loadbalancer/wrr/wrr.go:196","message":"Service selected by WRR: 446123679e5606b1"}

{"level":"debug","time":"2024-12-23T09:45:41Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/loadbalancer/wrr/wrr.go:196","message":"Service selected by WRR: 446123679e5606b1"}

{"level":"debug","time":"2024-12-23T09:46:54Z","caller":"github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:228","message":"Serving default certificate for request: \"\""}

If i check the logs directly from the container with docker logs and i try to connect to the app with https/domain/ors, i have this line who does not appear in the traefik logss:

reverse-proxy | 91.168.202.123 - - [23/Dec/2024:09:51:07 +0000] "GET /ors HTTP/1.1" 404 431 "-" "-" 4 "ors@docker" "http://172.18.0.3:8082" 1ms

Hey, thanks for your help !
I did what you said (remove the expose ports part on the service), and i activated the logs, that is the output:

{"level":"info","version":"3.2.3","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/cmd/traefik/traefik.go:103","message":"Traefik version 3.2.3 built on 2024-12-16T10:31:50Z"}

{"level":"debug","staticConfiguration":{"global":{"checkNewVersion":true},"serversTransport":{"maxIdleConnsPerHost":200},"tcpServersTransport":{"dialKeepAlive":"15s","dialTimeout":"30s"},"entryPoints":{"postgres":{"address":":5500","transport":{"lifeCycle":{"graceTimeOut":"10s"},"respondingTimeouts":{"readTimeout":"1m0s","idleTimeout":"3m0s"}},"forwardedHeaders":{},"http":{"maxHeaderBytes":1048576},"http2":{"maxConcurrentStreams":250},"udp":{"timeout":"3s"}},"web":{"address":":80","transport":{"lifeCycle":{"graceTimeOut":"10s"},"respondingTimeouts":{"readTimeout":"1m0s","idleTimeout":"3m0s"}},"forwardedHeaders":{},"http":{"maxHeaderBytes":1048576},"http2":{"maxConcurrentStreams":250},"udp":{"timeout":"3s"}},"websecure":{"address":":443","transport":{"lifeCycle":{"graceTimeOut":"10s"},"respondingTimeouts":{"readTimeout":"1m0s","idleTimeout":"3m0s"}},"forwardedHeaders":{},"http":{"maxHeaderBytes":1048576},"http2":{"maxConcurrentStreams":250},"udp":{"timeout":"3s"}}},"providers":{"providersThrottleDuration":"2s","docker":{"watch":true,"defaultRule":"Host(`{{ normalize .Name }}`)","endpoint":"unix:///var/run/docker.sock"},"file":{"directory":"/etc/config_tls/","watch":true}},"log":{"level":"DEBUG","format":"json","filePath":"/logs/traefik.log"},"accessLog":{"format":"common","filters":{},"fields":{"defaultMode":"keep","headers":{"defaultMode":"drop"}}},"certificatesResolvers":{"myresolver":{"acme":{"email":"nicolas.delory@galileo.energy","caServer":"https://acme-v02.api.letsencrypt.org/directory","storage":"/letsencrypt/acme.json","keyType":"RSA4096","certificatesDuration":2160,"tlsChallenge":{}}}}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/cmd/traefik/traefik.go:110","message":"Static configuration loaded [json]"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/cmd/traefik/traefik.go:626","message":"\nStats collection is disabled.\nHelp us improve Traefik by turning this feature on :)\nMore details on: https://doc.traefik.io/traefik/contributing/data-collection/\n"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:73","message":"Starting provider aggregator *aggregator.ProviderAggregator"}

{"level":"debug","entryPointName":"web","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/server_entrypoint_tcp.go:231","message":"Starting TCP Server"}

{"level":"debug","entryPointName":"websecure","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/server_entrypoint_tcp.go:231","message":"Starting TCP Server"}

{"level":"debug","entryPointName":"postgres","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/server_entrypoint_tcp.go:231","message":"Starting TCP Server"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *file.Provider"}

{"level":"debug","config":{"directory":"/etc/config_tls/","watch":true},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*file.Provider provider configuration"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/file/file.go:122","message":"add watcher on: /etc/config_tls/"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/file/file.go:122","message":"add watcher on: /etc/config_tls/traefik-dynamic.toml"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *traefik.Provider"}

{"level":"debug","config":{},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*traefik.Provider provider configuration"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *docker.Provider"}

{"level":"debug","config":{"watch":true,"defaultRule":"Host(`{{ normalize .Name }}`)","endpoint":"unix:///var/run/docker.sock"},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*docker.Provider provider configuration"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *acme.ChallengeTLSALPN"}

{"level":"debug","config":{},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*acme.ChallengeTLSALPN provider configuration"}

{"level":"info","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:202","message":"Starting provider *acme.Provider"}

{"level":"debug","config":{"email":"nicolas.delory@galileo.energy","caServer":"https://acme-v02.api.letsencrypt.org/directory","storage":"/letsencrypt/acme.json","keyType":"RSA4096","certificatesDuration":2160,"tlsChallenge":{},"ResolverName":"myresolver","store":{},"TLSChallengeProvider":{},"HTTPChallengeProvider":{}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/aggregator/aggregator.go:203","message":"*acme.Provider provider configuration"}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:221","message":"Attempt to renew certificates \"720h0m0s\" before expiry and check every \"24h0m0s\""}

{"level":"info","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:859","message":"Testing certificate renew..."}

{"level":"debug","providerName":"file","config":{"http":{},"tcp":{},"udp":{},"tls":{"options":{"default":{"cipherSuites":["TLS_AES_128_GCM_SHA256","TLS_AES_256_GCM_SHA384","TLS_CHACHA20_POLY1305_SHA256","TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA","TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA","TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256","TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"],"clientAuth":{},"alpnProtocols":["http/1.1","h2","acme-tls/1","postgresql"]}}}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","providerName":"internal","config":{"http":{"services":{"noop":{}},"serversTransports":{"default":{"maxIdleConnsPerHost":200}}},"tcp":{"serversTransports":{"default":{"dialKeepAlive":"15s","dialTimeout":"30s"}}},"udp":{},"tls":{}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","providerName":"myresolver.acme","config":{"http":{},"tcp":{},"udp":{},"tls":{}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) gis-data.westeurope.cloudapp.azure.com"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) lizmap.galileo.energy"}

{"level":"debug","providerName":"docker","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/pdocker.go:90","message":"Provider connection established with docker 27.3.1 (API 1.47)"}

{"level":"debug","providerName":"docker","config":{"http":{"routers":{"http-catchall":{"entryPoints":["web"],"middlewares":["redirect-to-https"],"service":"reverse-proxy-network","rule":"HostRegexp(`{host:.+}`)"}},"services":{"reverse-proxy-network":{"loadBalancer":{"servers":[{"url":"http://172.18.0.2:80"}],"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"}}}},"middlewares":{"redirect-to-https":{"redirectScheme":{"scheme":"https"}}}},"tcp":{},"udp":{},"tls":{}},"time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","tlsStoreName":"default","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:321","message":"No default certificate, fallback to the internal generated certificate"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) gis-data.westeurope.cloudapp.azure.com"}

{"level":"debug","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) lizmap.galileo.energy"}

{"level":"debug","tlsStoreName":"default","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:321","message":"No default certificate, fallback to the internal generated certificate"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","serviceName":"reverse-proxy-network@docker","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:318","message":"Creating load-balancer"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","serviceName":"reverse-proxy-network@docker","serverName":"b9597fe0f5ca1856","target":"http://172.18.0.2:80","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:355","message":"Creating server"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","middlewareName":"redirect-to-https@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:29","message":"Creating middleware"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","middlewareName":"redirect-to-https@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:30","message":"Setting up redirection to https "}

{"level":"debug","entryPointName":"web","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","time":"2024-12-23T09:44:45Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:25","message":"Creating middleware"}

{"level":"debug","providerName":"docker","time":"2024-12-23T09:45:09Z","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/pdocker.go:112","message":"Provider event received {Status:start ID:5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f From:openrouteservice/openrouteservice:v9.0.0 Type:container Action:start Actor:{ID:5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f Attributes:map[com.docker.compose.config-hash:9ab6f17c83394446d8291607364caead2fce1dda6d9222d92a693d8d1bfb8222 com.docker.compose.container-number:1 com.docker.compose.depends_on: com.docker.compose.image:sha256:207c211752323d657369ca07cf2cb2d67d789583ffc1749ccae02e2d82e3c744 com.docker.compose.oneoff:False com.docker.compose.project:ors com.docker.compose.project.config_files:/home/azureuser/docker/ors/docker-compose.yml com.docker.compose.project.working_dir:/home/azureuser/docker/ors com.docker.compose.service:ors-app com.docker.compose.version:2.29.7 image:openrouteservice/openrouteservice:v9.0.0 name:ors-app traefik.enable:true traefik.http.middlewares.ors-stripprefix.stripprefix.forceslash:true traefik.http.middlewares.ors-stripprefix.stripprefix.prefixes:/ors traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent:true traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme:https traefik.http.routers.ors.entrypoints:websecure traefik.http.routers.ors.middlewares:test-redirectscheme,ors-stripprefix traefik.http.routers.ors.rule:Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`) traefik.http.routers.ors.service:ors traefik.http.routers.ors.tls.certresolver:myresolver traefik.http.services.ors.loadbalancer.server.port:8082]} Scope:local Time:1734947109 TimeNano:1734947109706907644}"}

{"level":"debug","providerName":"docker","providerName":"docker","container":"ors-app-ors-5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f","time":"2024-12-23T09:45:09Z","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/config.go:200","message":"Filtering unhealthy or starting container"}

{"level":"debug","providerName":"docker","config":{"http":{"routers":{"http-catchall":{"entryPoints":["web"],"middlewares":["redirect-to-https"],"service":"reverse-proxy-network","rule":"HostRegexp(`{host:.+}`)"}},"services":{"reverse-proxy-network":{"loadBalancer":{"servers":[{"url":"http://172.18.0.2:80"}],"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"}}}},"middlewares":{"redirect-to-https":{"redirectScheme":{"scheme":"https"}}}},"tcp":{},"udp":{},"tls":{}},"time":"2024-12-23T09:45:09Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","providerName":"docker","time":"2024-12-23T09:45:09Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:127","message":"Skipping unchanged configuration"}

{"level":"debug","providerName":"docker","time":"2024-12-23T09:45:15Z","caller":"github.com/traefik/traefik/v3/pkg/provider/docker/pdocker.go:112","message":"Provider event received {Status:health_status: healthy ID:5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f From:openrouteservice/openrouteservice:v9.0.0 Type:container Action:health_status: healthy Actor:{ID:5377f437ae2c1046b3003e6f5f428c7f354d9b9ba086f99d51c55db965e76b4f Attributes:map[com.docker.compose.config-hash:9ab6f17c83394446d8291607364caead2fce1dda6d9222d92a693d8d1bfb8222 com.docker.compose.container-number:1 com.docker.compose.depends_on: com.docker.compose.image:sha256:207c211752323d657369ca07cf2cb2d67d789583ffc1749ccae02e2d82e3c744 com.docker.compose.oneoff:False com.docker.compose.project:ors com.docker.compose.project.config_files:/home/azureuser/docker/ors/docker-compose.yml com.docker.compose.project.working_dir:/home/azureuser/docker/ors com.docker.compose.service:ors-app com.docker.compose.version:2.29.7 image:openrouteservice/openrouteservice:v9.0.0 name:ors-app traefik.enable:true traefik.http.middlewares.ors-stripprefix.stripprefix.forceslash:true traefik.http.middlewares.ors-stripprefix.stripprefix.prefixes:/ors traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent:true traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme:https traefik.http.routers.ors.entrypoints:websecure traefik.http.routers.ors.middlewares:test-redirectscheme,ors-stripprefix traefik.http.routers.ors.rule:Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`) traefik.http.routers.ors.service:ors traefik.http.routers.ors.tls.certresolver:myresolver traefik.http.services.ors.loadbalancer.server.port:8082]} Scope:local Time:1734947115 TimeNano:1734947115949087836}"}

{"level":"debug","providerName":"docker","config":{"http":{"routers":{"http-catchall":{"entryPoints":["web"],"middlewares":["redirect-to-https"],"service":"reverse-proxy-network","rule":"HostRegexp(`{host:.+}`)"},"ors":{"entryPoints":["websecure"],"middlewares":["test-redirectscheme","ors-stripprefix"],"service":"ors","rule":"Host(`lizmap.galileo.energy`) \u0026\u0026 PathPrefix(`/ors`)","tls":{"certResolver":"myresolver"}}},"services":{"ors":{"loadBalancer":{"servers":[{"url":"http://172.18.0.3:8082"}],"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"}}},"reverse-proxy-network":{"loadBalancer":{"servers":[{"url":"http://172.18.0.2:80"}],"passHostHeader":true,"responseForwarding":{"flushInterval":"100ms"}}}},"middlewares":{"ors-stripprefix":{"stripPrefix":{"prefixes":["/ors"],"forceSlash":true}},"redirect-to-https":{"redirectScheme":{"scheme":"https"}},"test-redirectscheme":{"redirectScheme":{"scheme":"https","permanent":true}}}},"tcp":{},"udp":{},"tls":{}},"time":"2024-12-23T09:45:15Z","caller":"github.com/traefik/traefik/v3/pkg/server/configurationwatcher.go:227","message":"Configuration received"}

{"level":"debug","time":"2024-12-23T09:45:15Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) gis-data.westeurope.cloudapp.azure.com"}

{"level":"debug","time":"2024-12-23T09:45:15Z","caller":"github.com/traefik/traefik/v3/pkg/tls/certificate.go:132","message":"Adding certificate for domain(s) lizmap.galileo.energy"}

{"level":"debug","tlsStoreName":"default","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/tls/tlsmanager.go:321","message":"No default certificate, fallback to the internal generated certificate"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","serviceName":"reverse-proxy-network@docker","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:318","message":"Creating load-balancer"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","serviceName":"reverse-proxy-network@docker","serverName":"b9597fe0f5ca1856","target":"http://172.18.0.2:80","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:355","message":"Creating server"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","middlewareName":"redirect-to-https@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:29","message":"Creating middleware"}

{"level":"debug","entryPointName":"web","routerName":"http-catchall@docker","middlewareName":"redirect-to-https@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:30","message":"Setting up redirection to https "}

{"level":"debug","entryPointName":"web","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:25","message":"Creating middleware"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","serviceName":"ors@docker","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:318","message":"Creating load-balancer"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","serviceName":"ors@docker","serverName":"446123679e5606b1","target":"http://172.18.0.3:8082","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:355","message":"Creating server"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","middlewareType":"StripPrefix","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/stripprefix/strip_prefix.go:32","message":"Creating middleware"}

{"level":"warn","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","middlewareType":"StripPrefix","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/stripprefix/strip_prefix.go:35","message":"`ForceSlash` option is deprecated, please remove any usage of this option."}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/observability/middleware.go:33","message":"Adding tracing to middleware"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"test-redirectscheme@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:29","message":"Creating middleware"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"test-redirectscheme@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:30","message":"Setting up redirection to https "}

{"level":"debug","entryPointName":"websecure","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:25","message":"Creating middleware"}

{"level":"debug","entryPointName":"websecure","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/router/tcp/manager.go:237","message":"Adding route for lizmap.galileo.energy with TLS options default"}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:445","message":"Trying to challenge certificate for domain [lizmap.galileo.energy] found in HostSNI rule"}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:915","message":"Looking for provided certificate(s) to validate [\"lizmap.galileo.energy\"]..."}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","domains":["lizmap.galileo.energy"],"time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:959","message":"No ACME certificate generation required for domains"}

{"level":"debug","time":"2024-12-23T09:45:35Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/loadbalancer/wrr/wrr.go:196","message":"Service selected by WRR: 446123679e5606b1"}

If i check the logs from the container direclty, i have this line who appears when i try to reach the url https/domain/ors:

reverse-proxy | 91.168.202.123 - - [23/Dec/2024:09:45:35 +0000] "GET /ors HTTP/1.1" 404 431 "-" "-" 1 "ors@docker" "http://172.18.0.3:8082" 11ms

Hey thank you for your help !

I did what you said, notpublishing ports with the target service, and setted up the logs.
ORS is actually an api application.

Here is a piece of the traefik logs:

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","serviceName":"ors@docker","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:318","message":"Creating load-balancer"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","serviceName":"ors@docker","serverName":"446123679e5606b1","target":"http://172.18.0.3:8082","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/service.go:355","message":"Creating server"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","middlewareType":"StripPrefix","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/stripprefix/strip_prefix.go:32","message":"Creating middleware"}

{"level":"warn","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","middlewareType":"StripPrefix","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/stripprefix/strip_prefix.go:35","message":"`ForceSlash` option is deprecated, please remove any usage of this option."}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"ors-stripprefix@docker","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/observability/middleware.go:33","message":"Adding tracing to middleware"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"test-redirectscheme@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:29","message":"Creating middleware"}

{"level":"debug","entryPointName":"websecure","routerName":"ors@docker","middlewareName":"test-redirectscheme@docker","middlewareType":"RedirectScheme","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/redirect/redirect_scheme.go:30","message":"Setting up redirection to https "}

{"level":"debug","entryPointName":"websecure","middlewareName":"traefik-internal-recovery","middlewareType":"Recovery","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/middlewares/recovery/recovery.go:25","message":"Creating middleware"}

{"level":"debug","entryPointName":"websecure","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/server/router/tcp/manager.go:237","message":"Adding route for lizmap.galileo.energy with TLS options default"}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:445","message":"Trying to challenge certificate for domain [lizmap.galileo.energy] found in HostSNI rule"}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:915","message":"Looking for provided certificate(s) to validate [\"lizmap.galileo.energy\"]..."}

{"level":"debug","providerName":"myresolver.acme","acmeCA":"https://acme-v02.api.letsencrypt.org/directory","providerName":"myresolver.acme","ACME CA":"https://acme-v02.api.letsencrypt.org/directory","routerName":"ors@docker","rule":"Host(`lizmap.galileo.energy`) && PathPrefix(`/ors`)","domains":["lizmap.galileo.energy"],"time":"2024-12-23T09:45:16Z","caller":"github.com/traefik/traefik/v3/pkg/provider/acme/provider.go:959","message":"No ACME certificate generation required for domains"}

{"level":"debug","time":"2024-12-23T09:45:35Z","caller":"github.com/traefik/traefik/v3/pkg/server/service/loadbalancer/wrr/wrr.go:196","message":"Service selected by WRR: 446123679e5606b1"}

And this is log of container when i try to connect to https/domain/ors:

91.168.x.x - - [24/Dec/2024:08:31:47 +0000] "GET /ors HTTP/1.1" 404 431 "-" "-" 1 "ors@docker" "http://172.18.0.3:8082" 2ms

I have no errors in the traefik logs, and no error in the target service logs, it seems to start fine but i cannot access it

Enable and check Traefik access log in JSON format, is error coming from target service (OriginStatus) or only from Traefik (DownstreamStatus).

The CLF access log was from your target service?

No, all is coming from the reverse-proxy (traefik) service, you right i enabled the logs not the access logs. So thats what i see for the access logs:

{"ClientAddr":"91.168.202.123:61733","ClientHost":"91.168.202.123","ClientPort":"61733","ClientUsername":"-","DownstreamContentSize":431,"DownstreamStatus":404,"Duration":8429986,"OriginContentSize":431,"OriginDuration":8260885,"OriginStatus":404,"Overhead":169101,"RequestAddr":"lizmap.galileo.energy","RequestContentSize":0,"RequestCount":3,"RequestHost":"lizmap.galileo.energy","RequestMethod":"GET","RequestPath":"/ors","RequestPort":"-","RequestProtocol":"HTTP/1.1","RequestScheme":"https","RetryAttempts":0,"RouterName":"ors@docker","ServiceAddr":"172.18.0.3:8082","ServiceName":"ors@docker","ServiceURL":"http://172.18.0.3:8082","StartLocal":"2024-12-24T09:09:52.219151753Z","StartUTC":"2024-12-24T09:09:52.219151753Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","entryPointName":"websecure","level":"info","msg":"","time":"2024-12-24T09:09:52Z"}

{"ClientAddr":"91.168.202.123:61733","ClientHost":"91.168.202.123","ClientPort":"61733","ClientUsername":"-","DownstreamContentSize":431,"DownstreamStatus":404,"Duration":1388014,"OriginContentSize":431,"OriginDuration":1266913,"OriginStatus":404,"Overhead":121101,"RequestAddr":"lizmap.galileo.energy","RequestContentSize":0,"RequestCount":4,"RequestHost":"lizmap.galileo.energy","RequestMethod":"GET","RequestPath":"/ors","RequestPort":"-","RequestProtocol":"HTTP/1.1","RequestScheme":"https","RetryAttempts":0,"RouterName":"ors@docker","ServiceAddr":"172.18.0.3:8082","ServiceName":"ors@docker","ServiceURL":"http://172.18.0.3:8082","StartLocal":"2024-12-24T09:09:53.318546542Z","StartUTC":"2024-12-24T09:09:53.318546542Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","entryPointName":"websecure","level":"info","msg":"","time":"2024-12-24T09:09:53Z"}

{"ClientAddr":"91.168.202.123:61733","ClientHost":"91.168.202.123","ClientPort":"61733","ClientUsername":"-","DownstreamContentSize":431,"DownstreamStatus":404,"Duration":1492815,"OriginContentSize":431,"OriginDuration":1366314,"OriginStatus":404,"Overhead":126501,"RequestAddr":"lizmap.galileo.energy","RequestContentSize":0,"RequestCount":5,"RequestHost":"lizmap.galileo.energy","RequestMethod":"GET","RequestPath":"/ors","RequestPort":"-","RequestProtocol":"HTTP/1.1","RequestScheme":"https","RetryAttempts":0,"RouterName":"ors@docker","ServiceAddr":"172.18.0.3:8082","ServiceName":"ors@docker","ServiceURL":"http://172.18.0.3:8082","StartLocal":"2024-12-24T09:09:54.109007459Z","StartUTC":"2024-12-24T09:09:54.109007459Z","TLSCipher":"TLS_AES_128_GCM_SHA256","TLSVersion":"1.3","entryPointName":"websecure","level":"info","msg":"","time":"2024-12-24T09:09:54Z"}

It looks like i have 404 on both

If you get OriginStatus 404, then the target service probably does not like your host or path.

That was the point here !

The target service did not like my middleware strip because he was waiting for the part i stripped..

Thank you very much for your time :slight_smile:

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