Always getting page not found even for dashboard

I can not understand why I am getting the error: "404 page not found"
all the time (including dashboard). My redcap-admin exposes port 8080 yet i can not get anything. Through Traefik it is needed to pass request coming from 443 to the redcap-admin container using its 8080 port. From within the redcap-admin container I get response using

wget redcap-admin:8080

I get content but if using

https://${RC_SAML_HOSTNAME}/manage

I get 404 page not found

Any suggestions, please?

More information:

/etc/traefik/traefik.yml is:

## Static configuration
entryPoints:
  web80:
    address: ":80"
    http:
      encodeQuerySemicolons: true    

  web8080:
    address: ":8080"
    http:
      encodeQuerySemicolons: true    

  web443:
    address: ":443"
    http:
      encodeQuerySemicolons: true  

# providers:
#    docker:
#       exposedByDefault: false


tls:
  certificates:
    - certFile: /etc/certs/ssl.crt
      keyFile:  /etc/certs/ssl.key

# api:
#   dashboard: true
#   insecure: true

log:
  level: DEBUG
  filePath: /logs/traefik.log      

accessLog:    
    filePath: /logs/access.log
    format: json
    addInternals: true

and my docker-compose.yml is:

services:
  redcap-admin:
    image: local_docker_redcap:14.5.42-rc4
    tty: true
    container_name: redcap-admin

    environment:
      - REDCAP_BASE_URL=${RC_BASE_URL}
      - HTML_SUBDIRECTORY=${RC_SUBDIRECTORY}
    volumes:
      - ./db_config:/run/db_config
      - /mnt/hsc-ctscvs7/redcap:/run/data
    networks:
      - traefik-redcap-net      

    labels:
       - traefik.enable=true       
       - traefik.http.routers.redcap-admin.rule=Host(`${RC_SAML_HOSTNAME}`)
       - traefik.http.routers.redcap-admin.tls=false
       - traefik.http.routers.redcap-admin.entryPoints=web443
       - traefik.http.services.redcap-admin.loadbalancer.server.port=8080 # to pass request to app at port 8080 exposed by container
    
 
  traefik:
    container_name: traefik
    # The official v3 Traefik docker image 
    image: traefik:v3.3 
    # Enables the web UI and tells Traefik to listen to docker 
    command:         
        --providers.docker 

    ports:       
       - "443:443"
       - "80:80"
       - "8080:8080" 
      # The Web UI (enabled by --api.insecure=true) 

    volumes: 
      # So that Traefik can listen to the Docker events 
      - /var/run/docker.sock:/var/run/docker.sock     
      - ./traefik_ssl/:/etc/certs/
      # - ./certs-traefik.yml:/etc/traefik/dynamic/certs-traefik.yml
      - ./traefik.yml:/etc/traefik/traefik.yml
      - ./logs/:/logs/

    environment:
      - "TZ=America/Denver" # Set timezone

    labels:
      - "traefik.enable=true"       
      - "traefik.http.routers.traefik.rule=Host(`${RC_TRAEFIK_HOSTNAME}`)"
      - traefik.http.routers.traefik.entryPoints=web8080
      - traefik.http.routers.traefik.tls=false
      - traefik.http.services.traefik.loadbalancer.server.port=8080
    
    networks:
       - traefik-redcap-net

    
networks:
  traefik-redcap-net:
    external: true
    name: traefik-redcap-net

What do you get for

wget redcap-admin:8080/manage

You have tls as Traefik static config root element, that does not work, it belongs in a dynamic config file, loaded via providers.file.

You set .tls=false but access the entrypoint and router with https, which should not work.

Custom TLS certs need to be loaded and then enabled on an entrypoint or router.

wget redcap-admin:8080/manage I get an html file quite different to the 404 error page.

I created a new topic incorporating your ideas at:

Yet, I still have problems.

Thanks

For traefik: I changed the labels section to:

    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.mydashboard.rule=Host(`${RC_TRAEFIK_HOSTNAME}`)"      
      - "traefik.http.routers.mydashboard.entryPoints=web443"
      - "traefik.http.routers.mydashboard.service=api@internal"
      - "traefik.http.routers.mydashboard.middlewares=auth"  
      # - "traefik.http.services.traefik.loadbalancer.server.scheme=https"
      # - "traefik.http.services.traefik.loadbalancer.server.port=443"
      - "traefik.http.middlewares.auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/,test2:$$apr1$$d9hr9HBB$$4HxwgUir3HP4EsggP/QNo0"

and the ports: section to:

    ports:       
       - "443:443"
     

and now I can see the login page. Still, I could not answer my question on how to use port 8443 instead of 443 for Traefik.

To just change the external port number, you can use:

    ports:       
       - "8443:443"