Bad Gateway for external web site

Hello,
I'm new on Traefik and I would like to try it for testing.
My ports 80 and 443 are already in use so I have to use non standard port (refer to config file).
If I type in my browser http://nas.intra:85 => I get error 502 Bad Gateway (external web site), any help is welcome :slight_smile:

My docker compose file:

version: '3.7'
services:
  traefik:
    image: traefik:v2.5
    container_name: traefik
    restart: always
    command: --api.insecure=true --providers.docker
    ports:
      - 85:80
      - 8585:8080
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /volume1/docker/traefik/traefik.yml:/traefik.yml:ro
      # Add folder with dynamic configuration yml
      - /volume1/docker/traefik/configurations:/configurations
    labels:
      - "traefik.enable=true" # active la gestion de ce container par Traefik
      - "traefik.http.routers.traefik-api.rule=Host(`localhost`)" # indique à Traefik que le Host de la requête doit être 'localhost'
      - "traefik.http.routers.traefik-api.service=api@internal" # associe la route au service interne de Traefik api@internal
    restart: "unless-stopped"
    networks:
      - proxy

networks:
  proxy:
    name: proxy

Static config

# Enable traefik ui
api:
  dashboard: true
  insecure: true

accessLog:
  filePath: "/configurations/access.log"

entryPoints:
  web:
    address: ":80"
    proxyProtocol:
      insecure: true

pilot:
  dashboard: false

providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
  file:
    filename: /configurations/dynamic.yml
    watch: true
    
# Writing Logs to a File
log:
  filePath: "/configurations/traefik.log"
  level: DEBUG

Dynamic config

# As YAML Configuration File
http:
  routers:
    router1:
      service: myService
      middlewares:
       # - "foo-add-prefix"
      rule: "Host(`nas.intra`)"

  middlewares:
    foo-add-prefix:
      addPrefix:
        prefix: "/foo"

  services:
    myService:
      loadBalancer:
        servers:
          - url: "http://192.168.1.100"

You can only have 1 static configuration, either via command or config file.

Use command: --configFile=/traefik.yml.

And update your traefik version :slight_smile:

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