Need help im new in traefik

I have this traefik yaml config

version: "3.3"

services:

  traefik:
    image: "traefik:v2.11"
    container_name: "traefik"
    command:
      - "--api.insecure=true"  # Desactivar la interfaz API sin autenticación
      - "--api.dashboard=true"  # Activar el panel de control
      - "--api.debug=true"  # Activar el modo de depuración (opcional)
      (reemplazar hashedpassword con la contraseña hasheada)
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.convert.address=:8081"
      - "--certificatesresolvers.myresolver.acme.tlschallenge=true"
      - "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
    ports:
      - "443:443"
      - "8080:8080"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.traefik.rule=Host(`traefi`)"
      #- "traefik.http.routers.traefik.tls=true"
      - "traefik.http.routers.traefik.tls.certresolver=myresolver"
      - "traefik.http.routers.traefik.entrypoints=websecure"
      - "traefik.http.services.traefik.loadbalancer.server.port=8080"
      - "traefik.http.middlewares.httpsonly.redirectscheme.scheme=https"
      - "traefik.http.middlewares.httpsonly.redirectscheme.permanent=true"
      - "traefik.http.routers.httpsonly.rule=HostRegexp(`{any:.*}`)"
      - "traefik.http.routers.httpsonly.middlewares=httpsonly"
      - "traefik.http.routers.traefik.middlewares=auth" # enable password auth
    volumes:
      - "./letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    networks:
      - traefik-global-proxy

networks:
  traefik-global-proxy:
    name: "traefik-global-proxy"

and this config for one container that exposes port 80

version: "3.3"

services:
   convert:
    image: dwaaan/hrconvert2-docker:latest
    restart: always
    networks:
      - traefik-global-proxy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.convert.rule=Host(`)"
      - "traefik.http.services.convert.loadbalancer.server.port=80"
      - "traefik.http.routers.convert.tls=true"
      - "traefik.http.routers.convert.tls.certresolver=myresolver"
      - "traefik.http.routers.convert.entrypoints=convert"
      - "traefik.http.middlewares.convert.redirectscheme.scheme=https"
      - "traefik.http.middlewares.convert.redirectscheme.permanent=true"
      #- "traefik.http.routers.screen.rule=HostRegexp(`{any:.*}`)"
      - "traefik.http.routers.convert.middlewares=httpsonly"
    volumes:
      - ./config.php:/var/www/html/HRProprietary/HRConvert2/config.php

networks:
  traefik-global-proxy:
    external: true

i dont know why but if i try to connect to url is not working. i have 3 more docker containers that work perfect. i think it could be because it uses port 80? how can i fix?
thanks

I tried modifying the entrypoints, the

traefik.http.services.convert.loadbalancer.server.port

to 8081 and all these things but nothing

Maybe check simple Traefik example for a template.

loadbalancer.server.port indicates the port that the target container is using internally, inside the Docker network.

I did already. but is not working any docker container that uses the port 80

What's the problem? How about an error message? Is another process already listening on port 80?

Are you running Linux? Try netstat -tulpn to see which process uses which port.

No, port 80 is free even if i start the container of this app. Yes is linux. I do not see any error in traefik logs or in this app logs.

I just did traefik from the beggining with this link you sent and it works! thanks

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